You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Later in the initEditor method emitOnChange is called if an initialValue is set.
Therefore the control gets marked as dirty.
if (typeof this.initialValue === 'string') {
this.ngZone.run(() => {
editor.setContent(this.initialValue as string);
if (editor.getContent() !== this.initialValue) {
this.emitOnChange(editor); // <- that's the problem I guess
}
if (this.onInitNgModel !== undefined) {
this.onInitNgModel.emit(editor as unknown as EventObj<any>);
}
});
}
What is the expected behavior?
Control should not be marked as dirty.
Which versions of TinyMCE/TinyMCE-Angular, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE or TinyMCE-Angular?
"@angular/core": "^19.0.0"
"@tinymce/tinymce-angular": "^8.0.1"
The text was updated successfully, but these errors were encountered:
Create binding via reactive forms, set
updateOn: blur
.Focusing & blurring marks control as dirty despite no changes being made.
Example: https://stackblitz.com/edit/stackblitz-starters-tiunc5dt?file=src%2Fmain.ts
I think I found the cause:
If I create a FormControl with an initial value, that value is written to
initalValue
Later in the
initEditor
methodemitOnChange
is called if aninitialValue
is set.Therefore the control gets marked as dirty.
What is the expected behavior?
Control should not be marked as dirty.
Which versions of TinyMCE/TinyMCE-Angular, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE or TinyMCE-Angular?
"@angular/core": "^19.0.0"
"@tinymce/tinymce-angular": "^8.0.1"
The text was updated successfully, but these errors were encountered: