开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜