question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CkEditor Instance value not cleared when i call form.reset()

See original GitHub issue

After i submitting my form data, i’ll clear form for new input. but the ckeditor instance value not cleared! how can i do that?

  • i use model driven form
  • i use angular 4

my template code is: <ckeditor formControlName="content"></ckeditor>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9

github_iconTop GitHub Comments

4reactions
kzimnycommented, Dec 18, 2017

If other people identify the same problem, please report and the task will be reopen.

1reaction
sadiqodhocommented, May 8, 2019

Resolved by Setting html text instead of ‘’ string

this.ckeditor.instance.setData('<p></p>');
this.ckeditor.instance.updateElement(); 
Read more comments on GitHub >

github_iconTop Results From Across the Web

reset ckeditor value on form reset button - Stack Overflow
I'd set empty data to the editor first and call editor.updateElement() to reset both field and the editor: ... onClick="CKEDITOR.instances.theInstance.
Read more >
CkEditor Instance value not cleared when i call form.reset()
After i submitting my form data, i'll clear form for new input. but the ckeditor instance value not cleared! how can i do...
Read more >
ckeditor reset instance | CKEditor.com Forums
This is run in a seperate function outside clearform and would like everything that works to clear the forms of data to be...
Read more >
Clear CKeditor form after submission - Experts Exchange
value = ''; document.getElementById('phone').value = ''; // keep going untill all your form input fields are empty. Replace the values inside ...
Read more >
Javascript – reset ckeditor value on form reset button - iTecNote
This resets all the controls on my form except the ckeditor, and I want to be able to reset the value of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found