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:
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!
Works for me neither. Must be a bug. But with jquery there is a way arround.
For the jquery adapter have a look here: http://ckeditor.com/blog/CKEditor_for_jQuery