-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Hey everyone 👋
the disabled property is being ignored during initialization when used with template-driven forms and ngModel. The editor remains editable even when the disabled property is set to true.
Already tried to fix it myself Ticket-Gretchen@0eddf53 based on the fix done in the TinyMCE repo tinymce/tinymce-angular@8a7e6db. But this did not seem to solve the problem.
What is the current behavior?
When using the editor component in template-driven forms like this:
<editor
[id]="uuid"
[init]="config"
[disabled]="!mode().editable"
[(ngModel)]="formValue?.infoText"
(onFocusIn)="focus()"
(onBlur)="blur()"
(onChange)="onChange($event)"
></editor>
The editor is still editable when !mode().editable results in true.
Please provide the steps to reproduce.
- Create a template-driven form with the component
- Set the disabled property to true initially
- Observe that the editor is still interactive despite the disabled state
What is the expected behavior?
The editor component should respect the disabled property from the start and prevent any user interaction when disabled="true".
Which versions of HugeRTE/HugeRTE-Angular, and which browser / OS are affected by this issue? Did this work in previous versions of HugeRTE or hugerte-angular?
Tested with the following verions and browser:
"@hugerte/hugerte-angular": "^1.0.2"
"hugerte": "^1.0.9"
Google Chrome Version 138.0.7204.184