Safari Jquery Dialog and Ckeditor
I am using a CKEditor in a Jquery Dialog... and in Safari the first time it loads it works but each subsequent开发者_开发知识库 time it is blank and no buttons or anything else works in the ckeditor...
I have looked at CKEditor instance in a jQuery dialog and added the suggested dialog-patch.js but it doesn't help
$("#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());
}});
That is my code, and it works it all browsers (well Chrome, IE and FF) but not in Safari!
Remove the patch. Download and install 3.4.2 CKEditor. I load my editors with this function...
function loadeditor(id)
{
var instance = CKEDITOR.instances[id];
if(instance)
{
CKEDITOR.remove(instance);
}
$('#'+id).ckeditor(function() {
CKFinder.setupCKEditor( this, '/assets/ckfinder/', 'MyFiles' );
});
}
I think if you do not use the CKFinder integration, you can do something like...
function loadeditor(id)
{
var instance = CKEDITOR.instances[id];
if(instance)
{
CKEDITOR.remove(instance);
}
CKEDITOR.replace(instance);
}
Working like a charm finally.
精彩评论