CKEditor instance already exists

前端 未结 30 3438
刺人心
刺人心 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条回答
  •  -上瘾入骨i
    2020-11-27 12:07

    This is the simplest (and only) solution that worked for me:

    if(CKEDITOR.instances[editorName])
       delete CKEDITOR.instances[editorName];
    CKEDITOR.replace(editorName);
    

    Deleting this entry in the array prevents this form safety check from destroying your application.

    destroy() and remove() did not work for me.

提交回复
热议问题