我对 ckeditor 和 jquery 对话窗口有疑问。我有一个表单,我将一个 div 拖到一个可排序的表中。拖动时,我正在克隆 div 并打开一个包含 ckeditor 的 jquery 对话框。编辑器是在对话框的 open 方法上创建的,并在关闭时被销毁。第一次拖动编辑器后,它在对话框中打开,但是页面中的所有对话框都没有打开。我收到此错误:Uncaught TypeError: Object [object Object] has no method 'dialog'
尝试打开另一个对话框或使用编辑器拖动另一个 div 时。我的代码是:
var CKEditor
$("#dialog_editor").dialog({
autoOpen: false,
height: 500,
width: $("#td_form").width(),
modal: true,
zIndex: -1,
buttons: [
{
text: "Save",
"class": 'btn btn_content',
click: function () {
saveEditorContent();
}
}
],
open: function (type, data) {
$(this).parent().appendTo("#form");
CKEditor = CKEditor = CKEDITOR.replace('text_editor', {
extraPlugins: 'autogrow',
removePlugins: 'resize'
});
},
close: function () {
CKEditor.destroy();
}
});
我在网上搜索了所有内容,但仍然没有找到答案。我尝试添加adapters/jquery.js
,但仍然是同样的问题......