Closed alexpanchuk closed 6 years ago
This is because you are not setting the data in CKEditor to "" in your clearData() function. The change event is used for listening to changes inside CKEditor and not to change data inside CKEditor from outside.
To solve this, follow these steps:
Add a ref to your CKEditor component to access the child functions.
<CKEditor ref={instance => { this.ckeditor = instance; }} />
Now you can set data in your CKEditor like this. Simply call this method in your clearData() function.
this.ckeditor.editorInstance.setData("");
Hope this solves your query.
Thank you. Is there any documentation about such methods?
Welcome. I have documented most of the things in the Readme file. Rest you can find in the closed issues. In case you feel anything missing in the Readme/anything additional that you can contribute, feel free to raise a pull request.
Some problem with subj. When i click on button state.content become equal "", but in input field it still not changed