KillerCodeMonkey / ngx-quill

Angular (>=2) components for the Quill Rich Text Editor
MIT License
1.79k stars 262 forks source link

"sanitize"-property set in QuillModule.forRoot() is ignored in QuillEditorComponent #1887

Closed an-bss closed 4 months ago

an-bss commented 4 months ago

The call QuillModule.forRoot({ sanitize: true }) has no effect on QuillEditorComponent instances.

It is used here: https://github.com/KillerCodeMonkey/ngx-quill/blob/2ec7418f1ca7c7201b444a92483dd6d996f2b698/projects/ngx-quill/src/lib/quill-editor.component.ts#L199 The setting from the config in the service is only being used, if this.sanitize() is neither true nor false. this.sanitize() is an input and defined here: https://github.com/KillerCodeMonkey/ngx-quill/blob/2ec7418f1ca7c7201b444a92483dd6d996f2b698/projects/ngx-quill/src/lib/quill-editor.component.ts#L96

The input is initialized with false. Therefore the value from this.service.config.sanitize is never used. My proposal is to change the initial value of the input to undefined. Any thoughts on that?

KillerCodeMonkey commented 4 months ago
KillerCodeMonkey commented 4 months ago

released in v26.0.5