WYSIWYG html editor query - html

I am in the process of creating a simple WYSIWYG HTML editor to enable the users of my application to design simple HTML emails.
At the moment I have decided to use the web browser control with MSHTML to enable me to edit what is displayed. I have a tool bar which holds all of the relevant buttons, bold, underline, etc.
I need a way to check if the current block has any formatting so the correct state can be displayed on the buttons in the tool bar. I tried to add an event handler to the IHTMLDocument to fire when the mouse is moved or the arrow keys are pressed, however, this stopped the web browser from taking any input.
Is there a simpler way to achieve this goal?

There are several rich editors for free out of that tinyMCE is one of the better editor.
For list of editors see the link below.
http://www.queness.com/post/212/10-jquery-and-non-jquery-javascript-rich-text-editors

Related

Auto-filling web forms

I have to create video-tutorial as help. We have a document with help, but customer want video.
I have found chrome extensions for this purpose - Screencastify (https://www.screencastify.com) for recording chrome tab contenct. It is cool that this tool highlight user clicks.
The best trouble is filling forms. I can't find any tool, or chrome extension or something, whitch is able to fill fluently forms. When I am filling forms, i make some typing errors and typing is not fluent - video tutorial looks unprofesionall and chaotic.
I have tried UI Vision RPA (https://ui.vision/), but this tool does not simulate user click (yes with some extension, but before simulation user click screen becomes green for a while), but there are no highlighted clicked position.
Is there a tool that can simulate a smooth form fill according to a prepared script or a macro - basically something like an auto-run UI test, such as a keyboard shortcut that is able to simulate mouse clicks and fluently write defined form content?
There are lot of ways to do it. All below three allow record and play back.
1. VBA macros in excel,
2. Automated test tools and frameworks like Selenium
3. RPA tools like WinAutomation or automation anywhere etc.
Once you record, you can go to recorded script, correct any spelling mistakes, add any pauses needed, start your screen recorder and play back the script.

Modify DOM in content-script as a replacement for the non-ability to trigger pop-ups programmatically?

I'm working on an extension that's supposed to use the content of the page to determine whether to show an interface to the user.
The ways to show an interface, if I'm correct, are using a browser action or a page action.
And neither can be triggered programmatically. But content scripts could be written to inject an equivalent GUI into the webpage.
So, does it make sense to modify the DOM using content-scripts to display an interface as a substitute for page action? It seems like an obvious work around to me, and I'm sure there are good reasons to not let page actions be triggered programmatically.
Well, modifying DOM must be done by only Content Scripts, as that is the reason they exist.
Want to fetch any data from current page, alter anything in the page, add new UI in the page - whatever, content script will help you do that.
It has nothing to do with Page script Or Browser Script.
YES, you can not programatically trigger page/browser action. It has to be done by explicit clicking.
But if you want to open a UI by clicking a chrome extension, then there is a popup js for that.

infopath forms textbox word wrap chrome

The textbox in infopath form does not word-wrap the text in Chrome, but does it on IE? I have the multi-line setting checked on the text box. any idea?
Thanks in advance.
Upload a new css file to the “Style Library”.
File should contain the following:
textarea { white-space: pre-wrap !important; word-wrap: break-word
!important; }
Go to Site Settings – Look and Feel – Master Page
Set the Alternate CSS URL to point to the new CSS file that was added to the “Style Library”
Make sure to check “Reset all subsites…..”
Save and issue should be resolved for both Chrome and Firefox
You will have to replace the Text Box Control with a Rich Text Box Control and reconfigure the setting in the new control. You can rename the Rich Text Box control with the same field name after you delete the Text Box Control.
This is just common to Chrome right now, but Edge and Safari, could make the same changes, so might as well make the change to the form. Common to all three is they won't update a form when you make a change to the form.
You can add a "Query a Data Connection Rule" to another control (like a button) and when you use that control it will contact the server and update the form. If you use the same control on different views in the same form it seems to continue working, trial and error on that.
I assume Edge and Safari will make changes similar to Chrome, so you might as well change the Text Box to Rich Text. I have 300 controls to change. Good luck.
I have done it two different ways. I wanted to target only specific forms rather than spend a lot of time on it or do it in master page, I created CSS using Code from solution #1, then dropped it in the site assets library. After that I edited the InfoPath Forms SharePoint Web Part page, added a Content Editor Web Part to the page at bottom after the InfoPath Form Web Part, linked the new Content Editor Web Part to the CSS file, changed the Content Editor Web Part settings to not be seen, etc. and saved the Content Editor Web Part, Then Saved the Web Part Page.
Another way I have done this is added a Rich Text Editor Control to the InfoPath Form, then hide the original Text Box Control and set the Text box control default value to that of the Rich Text Editor Control. Sometimes this is quicker and easier than redoing all the business logic, especially if you are trying to go to PowerApps and get away from InfoPath, don't waste as much time on it. Obviously the drawback is increasing the number of SharePoint fields and fields in the form as well.
Best Regards.
SG.
Add a style.
textarea { white-space: pre-wrap !important; word-wrap: break-word !important; }
using script editor WP

Adding a interactive gui to my VB.net application

OK. So first, I will try my best to explain so good. My friend has gotten cursed out on this forum for not explaining, so I will explain. :)
Ok so I have my program built and all. But then it hit me! Wouldn't it be better to add a news feature? One teeny tiny problem? I cant? How would I implement a interactive code into an HTML page.
Like can i connect a button to a URL that will make the program do something. Almost like you can open cydia tweaks with there identifier and url EXAMPLE: http://handleopenurl.com/scheme/cydia And then i can add urls so i can update the program, without updating the files.
Or even just a featured news thing would be nice. But how would i implement this perfectly. I tryed a webrowser, but the page is too big for it. I am good at html, not much at css, i mostly use Adobe Muse http://www.adobe.com/Muse
Last question. Kinda defies the first thing i said about having my program finished.
Is there a way i can add a plus button and make it add more buttons and more labels and all?
This would help with allowing users to customize more then what the program can handle. By The Way, its a winter board Theme Maker. So I have a bunch of icons with there bundle identifiers and I create the folders with VB.net and all that stuff. But i want users to be able to click a plus button to add MORE text boxes and file browsers.
Any ideas? Maybe DIM 1 as NewFileBrowser? But i need to move all the buttons and i need it to be able to be clicked an infinity amount of times. I can do the coding for all of these buttons, but i jest need to know how to create them <1 Move them and the button so that the button goes further down each time, and more boxes will go further down. Much help apreciated. THANKS:)
EDIT:
Are you trying to say that you're wondering how to have a web browser control in a vb.net >app, which displays a web page, and when a button is clicked on the page, your app detects >it and does something? – Thraka
That sums up the top part. I am using windows forms, and it is coded in VB.net
If you get the object you want, like the button, you can hook the event and have it call code in your form.
Find the object using the Browser.Document.GetElementById method.
With that object, add an event handler to the Click event.
See http://msdn.microsoft.com/en-us/library/system.windows.forms.htmlelementeventhandler(v=vs.110).aspx for information about the event handler used

Is there a Surround With for aptana studio plugin?

Is there some way to get "surround with" in the Aptana perspective in Eclipse like you have in the Java perspective. I would love to be able to surround text with html tags like eg: <div></div> with a keyboard shortcut. Is there some way of doing that with the snippets rubles?
Thanks,
You can do this with AutoHotKey, which has the added benefit of being available across all apps. I have a script which launches a 'surround' menu when I select some text and press CTRL+SHIFT+C
To use it, install AutoHotKey, and create a new .txt file with the following code, and replace the extension with .ahk
http://pastebin.com/48ipiXsG
At the top of the file you'll find a number of groups of items, in the following format
<h1>~<h1>##</h1>
the ~ character divides the name of the function and the function content. The bit before ~ is what appears on your menu, and after the ~ is the code. ## represents where your selected text will go. So if you select the text 'AutoHotKey' and press CTRL+SHIFT+C, and then select <h1> from the menu, it'll replace the with <h1>AutoHotKey</h1>
There are several menus in the script, set up to launch based on what app you press CTRL+SHIFT+C in. For example, I get different shortcuts if I'm in Visual Studio than if I'm in SQL Server. You can modify these easily enough, but the generic menu should work fine for you. Feel free to chop and change but you have to leave GENERIC at the top of the script.
PS: I use this script everyday, and there is one small bug. The script saves whatever you have in the clipboard in a variable, and then writes it back to the clipboard when it's done. Sometimes, instead of surrounding text it replaces it with whatever you had in the clipboard. This is easily undone with CTRL-Z and usually works the second time you try it. I've never been able to figure out what causes this, maybe some autohotkey heads can help out?
PPS : This script is based on some other scripts from the AHK forums, including this one
http://www.autohotkey.com/docs/scripts/FavoriteFolders.htm
So you may find comments that don't make sense. I've seen a few references to the middle click, as the script above uses the middle mouse button instead of CTRL+SHIFT+C.