CKEditor instance in a jQuery dialog

后端 未结 11 1183
-上瘾入骨i
-上瘾入骨i 2021-01-03 01:03

I am using jQuery to open a dialog window with a textarea transformed into an instance of CKEditor. I\'m using the jQuery adapter provided by the CKEditor team but when the

相关标签:
11条回答
  • 2021-01-03 01:47

    Just solved the exact same problem by disabling the jQuery UI effect on the popup dialog (show option).

    Took me like forever to figure this out. Now the editor is behaving as expected.

    0 讨论(0)
  • 2021-01-03 01:48

    I used a callback function with the "show:" option to delay instantiating CKEditor until after the "show" animation was complete. I found that as little as 50 milliseconds will do the trick.

    modal: true,
    show: {
        effect: "drop",
        complete: function() {
            setTimeout(function(){
                $( "#selector" ).ckeditor();
            },50);
        }
    },
    hide: "drop",
    

    Hope this helps.

    0 讨论(0)
  • 2021-01-03 01:48

    I solved this by simply adding zIndex=-1 in the jQuery UI Dialog constructor like so

    $('#modalWindow').dialog({ autoOpen: false, modal: true, zIndex : -1});
    
    0 讨论(0)
  • 2021-01-03 01:48

    I am using jQuery to open a dialog window with a textarea transformed into an instance of CKEditor. I'm using the jQuery adapter provided by the CKEditor team but when the dialog window opens up I cannot interact with the editor (it's created but null is written in the content space and I can't click on anything or modify the content).

    Error: this.document.getWindow().$ is undefined Source File: includes/ckeditor/ckeditor.js
    Line: 129

    I am using Version 3.6.2

    0 讨论(0)
  • 2021-01-03 01:53

    Try putting the below the adapter. The fix is overriding the adapter.

    0 讨论(0)
提交回复
热议问题