I am trying to use angular2-tinymce library in my project. I have successfully integrated tinymce in my module. But i could not trigger any callback for change event when any changes happened in the tinymce editor.
// in add-progress-note.module.ts file
@NgModule({
declarations: [
AddProgressNotePage,
],
imports: [
IonicPageModule.forChild(AddProgressNotePage),
TinymceModule.withConfig({
menubar: false,
plugins: ['textcolor'],
toolbar: 'forecolor',
resize: false,
statusbar: false
})
]
})
// in add-progress-note.html file
<ion-row class="note-editor" id="noteArea">
<app-tinymce class="note-input-textarea" [(ngModel)]='noteText' (change)="onChangeNote()"></app-tinymce>
</ion-row>
// in add-progress-note.ts file
onChangeNote(): void {
console.log(this.noteText);
}
My onChangeNote did not fire.
How to trigger a callback event for any change event in tinymce editor?
2条答案
按热度按时间siv3szwd1#
如果您使用的是
ngModel
,则可以轻松地使用ngModelChange
来代替change
。ou6hu8tu2#
Ok, i use that and it's work, thanks Suraj Rao
html :
TS :