RichTextEditor Demo
Home Pricing

## editor.surroundByTagName(tagname)

Get the content of selection and place it into an element. Then insert this new element.

#### Syntax

`editor.surroundByTagName(tagname)`

###### Parameter

`Type: String`

`Required. The tagname of the elements you want to insert.`

###### Return Value

`Type: HTMLElement`

`The HtmlElement that was just inserted.`

## Example:

1. var editor1 = new RichTextEditor("#div_editor1");
2. editor1.setHTMLCode("hello world");
3. editor1.selectDoc();
4. editor1.surroundByTagName("blockquote");