jodit icon indicating copy to clipboard operation
jodit copied to clipboard

Not working with Angular 8?

Open elementalTIMING opened this issue 5 years ago • 7 comments

I found Jodit today and tried to integrate it into my project. Here I followed the instructions to integrate it with Angular (8). Unfortunately, it doesn't start and I get an error code

Jodit Version: 3.2.xxxxx

Browser: Chrome 78 OS: MacOS Catalina

Expected behavior:

That it runs like in the demo.

Actual behavior:

receive the error code Error: NullInjectorError: No provider for ElementRef!

elementalTIMING avatar Oct 30 '19 16:10 elementalTIMING

That's a jodit-angular issue: https://github.com/jodit/jodit-angular/issues/12#issuecomment-400940686

Just reinstall jodit-angular to fix it: npm install jodit-angular

OscarMeier avatar Nov 01 '19 10:11 OscarMeier

That's a jodit-angular issue: jodit/jodit-angular#12 (comment)

Just reinstall jodit-angular to fix it: npm install jodit-angular

I tried this but I get the same error code.

elementalTIMING avatar Nov 01 '19 19:11 elementalTIMING

Same issue here.

Stalyon avatar Nov 14 '19 09:11 Stalyon

The newest Jodit version is not compatible with the current jodit-angular build.

I can't confirm if @ronfogel's solution works since my app uses webpack and I couldn't get that working similarly.

My "solution" was to use these explicit versions: "jodit": "3.2.10", "jodit-angular": "1.0.59"

I tried for hours to get later versions of jodit-angular working in my angular 5 app and this is the only set of versions I can get working. Note: I had to specify the jodit version because the nested dependency in jodit-angular installs a version of jodit that is seemingly not compatible. Any version of jodit higher than this gives the "jodit not a constructor" error. https://github.com/jodit/jodit-angular/issues/25#issuecomment-492303317

Either use the [email protected] Version or use the jodit-angular-fork build which solves this problem: https://github.com/jodit/jodit-angular/issues/34#issuecomment-535533658

OscarMeier avatar Dec 02 '19 12:12 OscarMeier

Either use the [email protected] Version or use the jodit-angular-fork build which solves this problem: jodit/jodit-angular#34 (comment)

No sorry, that doesn't solves the problem :-(

elementalTIMING avatar Dec 05 '19 13:12 elementalTIMING

Hi, I've managed to make it work with Angular 8~9.

It seems that the last compatible version with Angular is:

    "jodit": "~3.3.24",
    "jodit-angular": "~1.0.99",

Ps: You need to put these ~ sign before the version, otherwise the package manager will pull out the latest version, which as of today is incompatible.

dtodt avatar Jun 23 '20 18:06 dtodt

All current Angular versions are now supported. From v8 till v11. Please see readme in jodit-angular package @xdan can close this issue

MrElectroNick avatar Mar 20 '21 17:03 MrElectroNick