how to clear ckeditor with jquery

前端 未结 4 423
伪装坚强ぢ
伪装坚强ぢ 2021-01-04 01:50

How can i clear the ckeditor textarea with jquery at the click of a button/link?

I have tried this : $(\"textarea.editor\").val(\'\'); and $(\"tex

4条回答
  •  独厮守ぢ
    2021-01-04 01:57

    The below code clears the value in the ckeditor textarea. This will works 4.4 version also.

          CKEDITOR.instances['content'].setData('');
    

    Content is the id of the particular text-area.

提交回复
热议问题