提交 06ac99c6 编写于 作者: C campaign

by zhanyi

上级 60d85156
......@@ -51,9 +51,9 @@ UE.plugins['insertcode'] = function() {
var frag = rng.extractContents();
var div = me.document.createElement();
div.appendChild(frag);
var code = '';
utils.each(UE.filterNode(UE.htmlparser(div.innerHTML),me.options.filterTxtRules).children,function(node){
code += node.innerText() + '<br/>'
code += (node.type == 'element' ? node.innerText() : node.data) + '<br/>'
});
}
me.execCommand('inserthtml','<pre id="coder"class="brush:'+lang+';toolbar:false">'+code+'</pre>',true);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册