KillerCodeMonkey / ngx-quill

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

QuillService with providedIn: 'root' seems to be bad idea #1611

Closed visitek closed 2 years ago

visitek commented 2 years ago

It seems to be impossible to have multiple configurations of quill on the page.

even with: providers: [ { provide: QUILL_CONFIG_TOKEN, useValue: { formats: [ 'bold', 'code', 'italic', 'link', 'strike', 'script', 'underline', .... ] } as QuillConfig } ]

the service is instantiated once in the root

KillerCodeMonkey commented 2 years ago

That was the initial idea, to just have a global config :).

You could pass custom config to the editor-component via customModules and customOptions.

KillerCodeMonkey commented 2 years ago

or you just create your own instance and use it as described here when using angular-elements.

https://github.com/KillerCodeMonkey/ngx-quill/issues/1481#issuecomment-1280999446