editor.surroundByTagName(tagname)
選択範囲のコンテンツを取得して要素の中に入れ、その新しい要素を挿入します。
構文
editor.surroundByTagName(tagname)
パラメーター
型:String
必須。挿入する要素のタグ名。
戻り値
型:HTMLElement
挿入された HtmlElement。
使用例
var editor1 = new RichTextEditor("#div_editor1");
editor1.setHTMLCode("hello world");
editor1.selectDoc();
editor1.surroundByTagName("blockquote");