Please don’t get confused with Rich Text Editor in classic VB. These controls are working with rich text format. The editor, I am explaining here also providing rich text editing. However the final format is HTML..
I don’t have a working source code for Rich Text Editor. However if you are just looking for an editor which supports hyperlinks and few word formatting, this article can help you to code one for your simple needs.
IFRAME as an editor
It is relatively very easy to build an editor using an IFRAME. But the real trouble comes in when trying to build an editor similar to a word processor like a Microsoft office word.
Bring the IFRAME to Editable mode using designMode
IFRAME can be used as an editor once the design mode is set to ‘ON’ as shown in the following code.
Native formatting abilities
The basic formatting like bold, italics, and underline natively supported with the shortcuts CTRL +B, CTRL + I, CTRL+U respectively. All the fully qualified URLS will be considered as hyperlinks once after pasting followed by pressing enter or pasting (next to the hyperlink). So without much code you can start using the IFRAME as an editor.
Specific formatting using a toolbar
If you still need more functionality like adding images and formatting using a tool bar .You may use the following syntax to fire commands
var EditorFrame = frames. EditorFrame.document.selection.createRange()
You can use the commands using ‘execCommand’ on the Range object of the Selection. Majority of the operations can be programmed like this to function as you expect.