我在Jquery对话框中使用CKEditor ...并且在第一次加载时它在Safari中工作,但是每次后续它都是空白的,并且ckeditor中没有任何按钮或其他任何工作...
我查看了CKEditor instance in a jQuery dialog并添加了建议的dialog-patch.js,但它没有帮助
$("#TextDialog").dialog({height:400,width:650, modal:true,closeOnEscape:true, autoOpen:false,
open: function(event, ui) {
$("#Text").ckeditor();
},
close: function(event, ui) {
CKEDITOR.remove($("#Text").ckeditorGet());
}});
这是我的代码,它适用于所有浏览器(Chrome,IE和FF),但不适用于Safari!
答案 0 :(得分:0)
删除补丁。下载并安装3.4.2 CKEditor。我用这个函数加载我的编辑器......
function loadeditor(id)
{
var instance = CKEDITOR.instances[id];
if(instance)
{
CKEDITOR.remove(instance);
}
$('#'+id).ckeditor(function() {
CKFinder.setupCKEditor( this, '/assets/ckfinder/', 'MyFiles' );
});
}
我认为如果您不使用CKFinder集成,您可以执行类似......
的操作function loadeditor(id)
{
var instance = CKEDITOR.instances[id];
if(instance)
{
CKEDITOR.remove(instance);
}
CKEDITOR.replace(instance);
}
终于像魅力一样工作。