CKEditor instance already exists

前端 未结 30 3535
刺人心
刺人心 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:03

    Indeed, removing the ".ckeditor" class from your code solves the issue. Most of us followed the jQuery integration example from the ckeditor's documentation:

    $('.jquery_ckeditor')
    .ckeditor( function() { /* callback code */ }, { skin : 'office2003' } );
    

    and thought "... maybe I can just get rid or the '.jquery_' part".

    I've been wasting my time tweaking the callback function (because the {skin:'office2003'} actually worked), while the problem was coming from elsewhere.

    I think the documentation should mention that the use of "ckeditor" as a class name is not recommended, because it is a reserved keyword.

    Cheers.

提交回复
热议问题