Documentation

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 usage

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