我正在尝试将CKEDITOR实例用于jqueryUI对话框。
$('[name=dialog]').dialog();
$('[name=content]','[name=dialog]').ckeditor();
它工作正常,直到我想使用编辑器中的对话框(f.e。对话框来设置URL,对话框来创建表格)
就像我无法点击该对话框..
我正在检查z-index(我认为这是问题),但没有,它是最高级别,没有,我不能使用这些对话框。
有人知道为什么会这样吗?
答案 0 :(得分:1)
我知道这篇文章有点晚了,但也许它会帮助下一个人。 要在对话框中创建ckeditor实例,您必须先加载对话框,然后像这样创建ckeditor:
$("#mydialog").dialog({
open: function() {
$("#mytextarea").ckeditor(); //LOAD IT HERE
},
close: function() {
//you might want to destroy the instance once the dialog closes
//to keep things clean
CKEDITOR.instances["mytextarea"].destroy();
},
autoOpen: true, ... more options
});
希望这有帮助。
答案 1 :(得分:0)
很简单,只需下一个代码(抱歉格式化,但我正在使用我的手机回复)
$("<div><textarea id='foo'></textarea></div>").dialog({});
CKEDITOR.replace("foo");