CKEditor instance already exists

前端 未结 30 3547
刺人心
刺人心 2020-11-27 11:24

I am using jquery dialogs to present forms (fetched via AJAX). On some forms I am using a CKEditor for the textareas. The editor displays fine on the first load.

Whe

30条回答
  •  星月不相逢
    2020-11-27 12:12

    For this to work you need to pass boolean parameter true when destroying instance:

        var editor = CKEDITOR.instances[name];
        if (editor) { editor.destroy(true); }
        CKEDITOR.replace(name);
    

提交回复
热议问题