Example of Methods in Javascript Modern Rich Text Editor

/
/
Methods

This sample demonstrates the public methods exposed by the Rich Text Editor UI component. Use the property panel on the right to invoke each method and observe the resulting behavior.

More Details...

Method Result


  
getHtml
getText
getDocument
focus
blur
Description

The Rich Text Editor UI exposes a rich set of public methods that allow you to programmatically interact with the editor instance. The methods shown here are grouped into a single property panel for quick access. getHtml() — returns the editor content as an HTML string. getText() — returns the editor content as plain text. getDocument() — returns the document markup of the editor content area as a string. focusIn() — focuses the editor. focusOut() — removes focus from the editor. Type or paste some content into the editor, then click an Invoke button to see each method in action. The result of the invoked method is displayed in the panel below the editor.