带有 jQuery UI 对话框、拼写检查和按钮在第二次单击时不起作用的 CKEditor

CKEditor with jQuery UI Dialog, spell check and buttons not working on second click

我正在使用 CKEditor 4 to turn a <textarea> into a WYSIWYG editor inside a jQuery UI Dialog

我有 3 个问题,我认为它们是相关的:

任何帮助都会很棒。这是我正在使用的代码:

function OpenDialog(modalID, w, h) {
    $("#" + modalID).css("display", "block");

    $("#" + modalID).dialog({
        draggable: false,
        height: h,
        width: w,
        resizable: false,
        modal: true,
        appendTo: "form",
        buttons: [
            {
                text: 'Save',
                class: "saveicon",
                click: function () {
                    //Save Stuff
                }
            }
        ]
    }).bind('dialogclose', function (event, ui) {
        //toggles the editor controls
        editor = CKEDITOR.instances['<%=txtEditor.ClientID %>'];
        if (editor) {
            editor.updateElement();
            editor.destroy();
        }
    });
    $(".saveicon").prepend('<span class="glyphicon glyphicon-floppy-disk"></span> ');
}

我的问题是多个问题的组合,都在我这边:

  • 按钮变灰是由于缓存问题。我清除了缓存,问题就解决了。

  • SCAYT 问题是因为我公司的防火墙阻止了对 SCAYT 网络服务的调用。