RichTextEditor Demo
Home Pricing

## editor.getHTMLCode()

This method is used for retrieving the content of RichTextEditor as HTML.

#### Syntax

`editor.getHTMLCode()`

###### Return value

`Type: String`

`The string contents of the editor with formatting data.`

`Output filters are used to strip-out internal content created during the editing process (such as allowScriptCode , tagAllowList , tagBlockList...).`

## Example:

1. var editor1 = new RichTextEditor("#div_editor1");
3. editor1.setHTMLCode("<p><b>Hello</b> World</p><p>Click the button below to show this HTML code</p>");
5. function btnShowHTMLCode() {
6. alert(editor1.getHTMLCode())
7. }