Angular 中的 Quill 编辑器未触发(更改)事件

Quill editor not firing (change) event in Angular

我正在使用带有 ngx-quill NPM 包的 Quill 编辑器。一切都很好,只是我无法触发 (change) 事件。这是 HTML:

<quill-editor (change)="validateChange(field)" [formControlName]="field.id" [id]="field.id"></quill-editor>

(change)="validateChange(field)" 无效。

感谢任何想法!!

在模型驱动的表单中,您可以在表单上使用 valueChanges Observable。

this.formName.valueChanges.subscribe(data => {
   console.log('Changed Values', data)
})

如果开发人员不想使用 reactiveForms,可以使用以下方式捕获输出事件:

<quill-editor (**onContentChanged**)="somefunction($event)" ></quill-editor>