Nxg-editor ( docs ) 无法在提交时清除其值。
我在标签中有这样的form
代码,但是当我点击使用form.reset()
它的方法时,并没有清除编辑器的值。其实,里面的值form
是清楚的,只是DOM结构上没有(它有一个<p>
带有先前内容的标签)。
如何从中删除所有内容?
我试过了this.editor.destroy()
,this.editor = new Editor();
但没有帮助
<ngx-editor-menu
[editor]="editor"
[toolbar]="toolbar">
</ngx-editor-menu>
<ngx-editor
[editor]="editor"
formControlName="answer">
</ngx-editor>
https://stackblitz.com/edit/ngx-editor-eqktlc?file=src/app/app.component.ts