RichTextEditor Demo
Home Pricing

## editor.surroundElement(element)

Creates an element using editor.document. Places the content of selection into the element. Then insert this new element.

#### Syntax

`editor.surroundElement(element)`

###### Parameter

`Type: HTMLElement`

`Required. The new element to insert.`

## Example:

1. var editor1 = new RichTextEditor("#div_editor1");
2. editor1.setHTMLCode("hello world");
3. editor1.selectDoc();
4. var element=editor1.document.createElement("BLOCKQUOTE");
5. editor1.surroundElement(element);