I recently updated to Angular 7, and as part of that, I upgraded ngx-quill from version 3 to version 4. After the upgrade, the [readOnly] binding no longer works - the Quill editor allows the text to be edited even with [readOnly]="true".
I can confirm that rolling back to version 3 fixes the [readOnly] binding. So far, the only downside of rolling back are these npm warnings:
npm WARN [email protected] requires a peer of @angular/core@^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/forms@^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.
The actual Quill editor seems to work correctly; rolling back to version 3 is a workable solution in the meantime.
works like charme in my demo:
https://killercodemonkey.github.io/ngx-quill-example/
checkout the Editor without toolbar + required and ngModule example and toggle readonly
using angular 7, latest angular 4.2.0, ....
@KillerCodeMonkey - Hmm, you're right. Must be something specific to my setup. I'll close this issue until I can find a better way to reproduce what I'm experiencing.
@nfriend if you solved your issue, feel free to let us know, how :)
Maybe it helps other devs.
Thanks
@KillerCodeMonkey This actually also exists in the demo app.
The problem only exists when having the readOnly-attribute set to "true" on initialization. Changing it to true after that (like its done via the toggle in the demo app) correctly locks the field.
aaahh i see. strange even if i pass "readOnly: true" in my component to the quill constructor it is not readonly 馃
dang i got it. the formControl disabled state was added. and this does not check the readonly setting.
should be fixed in 4.3.1 thanks! to get me in the right direction.
Most helpful comment
should be fixed in 4.3.1 thanks! to get me in the right direction.