← 全部文档

editor.createDialog

创建一个使用默认样式的对话框。详情请参阅插件示例。

语法

editor.createDialog(title,classname)

参数

类型:String

对话框标题。

参数

类型:String

对话框的类名。

用法示例

var editor1 = new RichTextEditor("#div_editor1");
var dlg=editor1.createDialog("Hello","myclass");
var panel=dlg.appendChild(document.createElement("div"));
panel.innerText="My Dialog Content";
setTimeout(function(){ dlg.close() },2000);