Quill Angular Error: NullInjectorError: No provider for InjectionToken config
Asked Answered
R

1

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

Reames answered 8/11, 2019 at 18:16 Comment(4)
you have asked the question and tell the solution within the question, Better would be to make it as answer separately.Aaronson
thank you. it is really helpfulBole
I had the same problem, your solution fixes it :) Thank you!Kellyekellyn
Can't thank you enough but this GEM was hidden in rubble! I skipped your question and was searching for the answer on the answers section. Please move the answer portion to answers and keep the question separate!Cemetery
W
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)

Wolfhound answered 30/12, 2019 at 16:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.