305 Star 1.5K Fork 291

GVPNotadd/Neditor

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
preview.js 813 Bytes
Copy Edit Raw Blame History
tianjign authored 8 years ago . replace ueditor to neditor
/**
* 预览
* @file
* @since 1.2.6.1
*/
/**
* 预览
* @command preview
* @method execCommand
* @param { String } cmd 命令字符串
* @example
* ```javascript
* editor.execCommand( 'preview' );
* ```
*/
UE.commands["preview"] = {
execCommand: function() {
var w = window.open("", "_blank", ""),
d = w.document;
d.open();
d.write(
'<!DOCTYPE html><html><head><meta charset="utf-8"/><script src="' +
this.options.UEDITOR_HOME_URL +
'neditor.parse.js"></script><script>' +
"setTimeout(function(){uParse('div',{rootPath: '" +
this.options.UEDITOR_HOME_URL +
"'})},300)" +
"</script></head><body><div>" +
this.getContent(null, null, true) +
"</div></body></html>"
);
d.close();
},
notNeedUndo: 1
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/notadd/neditor.git
git@gitee.com:notadd/neditor.git
notadd
neditor
Neditor
master

Search