KillerCodeMonkey / ngx-quill

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

Version 25 is broken due to formats are converted to object #1939

Open visitek opened 1 day ago

visitek commented 1 day ago
            let formats = this.formats();
            if (!formats && formats === undefined) {
                formats = this.service.config.formats ?
                    Object.assign({}, this.service.config.formats) : (this.service.config.formats === null ? null : undefined);
            }

Quill expects to have array instead of object

KillerCodeMonkey commented 1 day ago

if i check the latest v25 version.. everything is fine: https://github.com/KillerCodeMonkey/ngx-quill/blob/v25.3.2/projects/ngx-quill/src/lib/quill-editor.component.ts#L296

KillerCodeMonkey commented 1 day ago

@visitek do you use the latest v25 version?

visitek commented 15 hours ago

with using injection token, then it goes into the condition above. You can see Object.assign and that's the bug.. It makes object instead of array.. so quill then says forEach is not a function.

visitek commented 15 hours ago

and yes.. it is in 25.3.2

KillerCodeMonkey commented 14 hours ago

sorry but i do not see it. i linked the quill-editor component code of v25.3.2 and there is no Object.assign for the formats any more. it was there in earlier version of ngx-quill v25.

Just check the code i linked in my comment.

There arrays are used

visitek commented 14 hours ago

https://github.com/KillerCodeMonkey/ngx-quill/blob/v25.3.2/projects/ngx-quill/src/lib/quill-view.component.ts

it's in view component. It is fixed in later version as well.. but for ng17 nope

KillerCodeMonkey commented 14 hours ago

alrighty. the information about the quill view component was missing :)

KillerCodeMonkey commented 14 hours ago

try v25.3.3 please