I try to insert something after clear the content by using setData(""), then I insert something to it using insertText method. But the content remains empty.
Relevant code:
The code above is not working. Anyone could help me? finding another way to clear the content in CKEditor rather than using setData("") or make the insertText method working after setData would both help solve my problem. Many thanks!
Relevant code:
CKEDITOR.instances.content.setData(""); CKEDITOR.instances.content.focus(); CKEDITOR.instances.content.insertText("the text I want to insert");
The code above is not working. Anyone could help me? finding another way to clear the content in CKEditor rather than using setData("") or make the insertText method working after setData would both help solve my problem. Many thanks!