How to determine if CKEditor is loaded?

前端 未结 7 1465
野性不改
野性不改 2021-02-18 16:16

How do I find out if CKEditor is loaded? I\'ve looked through the API docs, but could only find the loaded event. I want to check if CKEditor is loaded, because if I load it a s

7条回答
  •  迷失自我
    2021-02-18 16:46

    //creating instance of ck-editor
    var yourInstance = CKEDITOR.instances.yourContainer;
    //check instance of your ck-editor 
    if(yourInstance){
          //destroy instance
          yourInstance .destroy(true); 
    }
    // create instance again
    CKEDITOR.replace( 'yourContainer' );
    

提交回复
热议问题