31

I updated all my node modules and when quill updated, all my editors broke in my application. The error "NullInjectorError: No provider for InjectionToken config!" appeared.

I Have fixed this problem! Just wanted to share with other ppl who might be in the same boat.

You need to add the QuillModule (import { QuillModule } from 'ngx-quill';) to the App Module 'Imports' section (or whatever module you are using). For me, I also needed to add .forRoot() to make it work

imports: [
    QuillModule.forRoot(),
],

Again, this works for me, just letting you all know in case you encounter the same problem updating ngx-quill to the newest version

1 Answers1

5

First You have to import QUILL_CONFIG_TOKEN from 'ngx-quill' library after that you have to pass this class to inject eg QuillModule.forRoot(QUILL_CONFIG_TOKEN.ngInjectableDef)