How to properly destroy CKEditor instance?

前端 未结 7 2168
无人及你
无人及你 2020-12-09 02:41

I am running CKeditor 3.4 on a pretty simple page. I am having a problem (sometimes) where when I call document.main_form.submit(), it will not send along the contents of th

7条回答
  •  醉话见心
    2020-12-09 03:32

    use this simple code.Note my text area id is editor1.
    or You can also check it with console.log(CKEDITOR.instances.editor1);

    if (CKEDITOR.instances.editor1) {
         CKEDITOR.instances.editor1.destroy();
    }
    

提交回复
热议问题