提交 e7f43442 编写于 作者: C campaign

预览变成dialog

上级 cbc76bb3
/**
* 预览
* @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+'ueditor.parse.js"></script></head><body><div>'+this.getContent(null,null,true)+'</div><script>' +
"setTimeout(function(){uParse('div',{rootPath: '"+ this.options.UEDITOR_HOME_URL +"'})},300)" +
'</script></body></html>');
d.close();
},
notNeedUndo : 1
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册