jodit / jodit-angular

Angular wrapper for Jodit && Hey. Due to the fact that I do not use Angular in my projects, I cannot fix plugin errors in a timely manner. If you want the plugin to develop, send PR or better become a contributor
MIT License
48 stars 35 forks source link

Remove editor from DOM #15

Open stiffold opened 6 years ago

stiffold commented 6 years ago

When I write something in the editor and then remove it with ngIf statement: TypeError: Cannot read property 'current' of undefined undefined TypeError: Cannot read property 'current' of undefined at t.calcPathImd (jodit.min.js:10) at jodit.min.js:10 at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421) at Object.onInvokeTask (core.js:3815) at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420) at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188) at push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask (zone.js:496) at ZoneTask.invoke (zone.js:485) at timer (zone.js:2054)

Steps to reproduce: 1) Place multiple editors like: <jodit-editor [formControl]="control1" *ngIf="control1enabled"></jodit-editor> <jodit-editor [formControl]="control2" *ngIf="control2enabled"></jodit-editor> <jodit-editor [formControl]="control3" *ngIf="control3enabled"></jodit-editor> 2) Write something to editor with control2 3) Switch control2enabled to control2enabled = false

jakub-stejskal commented 5 years ago

Workaround: add showXPathInStatusbar: false, to the jodit config to prevent the offending method calcPathImd from executing

douglaslaiber commented 5 years ago

I get error: Cannot read property 'toggle' of undefined.

JoditContainerComponent.html:3 ERROR TypeError: Cannot read property 'toggle' of undefined at s (jodit.min.js:10) at e. (jodit.min.js:10) at e.p (jodit.min.js:10) at jodit.min.js:10 at Array.every () at e. (jodit.min.js:10) at jodit.min.js:10 at Array.forEach () at e.eachEvent (jodit.min.js:10) at e.fire (jodit.min.js:10)