Safari Jquery 对话框和 Ckeditor

发布于 2024-09-01 16:10:55 字数 600 浏览 3 评论 0原文

我在 Jquery 对话框中使用 CKEditor...在 Safari 中,它第一次加载时可以工作,但随后每次它都是空白的,并且 ckeditor 中没有任何按钮或其他任何内容...

我看过 jQuery 对话框中的 CKEditor 实例 并添加了建议的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!

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

邮友 2024-09-08 16:10:55

移除补丁。下载并安装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);
}

最终像魅力一样工作。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文