-
How to clear editor value on reactive forms submit. Like when we have a form and there is this.from.reset() it clears value from it, but not from the editor. editor values are still there. Is there any way to remove it? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
found it |
Beta Was this translation helpful? Give feedback.
-
this.editor.view.dom.innerHTML = '' Though it works, it is not recommended directly modify the view . If your form is like this. class Component {
form = new FormGroup({
editor: new FormControl({ value: '', disabled: false }))
});
} you can do this.form.get('editor').reset('') This should work. Not sure why or directly with editor instance this.editor.setContent('') UpdateFrom v12.0.1, you can do this.form.reset() |
Beta Was this translation helpful? Give feedback.
#376 (comment)
Though it works, it is not recommended directly modify the view .
If your form is like this.
you can do
This should work. Not sure why
this.form.reset()
is not working though. I can check.or directly with editor instance
Update
From v12.0.1, you can do