-
Notifications
You must be signed in to change notification settings - Fork 93
Closed
Labels
Description
I use ckditor with ngFor, please see plnkr below.
plnkr: https://plnkr.co/edit/Rl4bBoMKOe6xFsduBaaS?p=preview
- when click button
remove me 0
, and then ckeditor break. - when click button
remove me 1
, ckeditor still can use.
Did I miss something?
Metadata
Metadata
Assignees
Labels
Projects
Milestone
Relationships
Development
Select code repository
Activity
[-]ngFor with ckeditor[/-][+]ngFor with ng2-ckeditor[/+]yabab-dev commentedon Aug 2, 2016
Thanks for this plunker !
I'll try to find a solution this week.
yabab-dev commentedon Aug 2, 2016
It seems a CKEditor bug : https://dev.ckeditor.com/ticket/12258
When we move CKEditor through the dom (like ngFor does) iframe isn't updated correctly.
Solution is to use divarea plugin or inline mode.
I need to work on that... and at the same time this approach can fix #24
yabab-dev commentedon Aug 2, 2016
Here is the fix : https://embed.plnkr.co/PqRdBfUdvJ71uUPzY8vG/
You need to include
divarea
plugin :Inline mode is not available atm.
Thanks for reporting this !
naveedahmed1 commentedon Aug 21, 2016
@CHYMZ I tried your solution but now I am receiving below error:
browser_adapter.ts:82 TypeError: Cannot read property 'getRanges' of null
rmcsharry commentedon Oct 13, 2017
Note that using 'divarea' does make this error go away BUT the side effect is that now you are using a div for the editor instead of the standard hidden textarea you get with the iFrame of ckeditor out of the box. This means that the CSS styles for your website now apply inside the div (ie. inside the editor area itself). So the user changing things like font style and size could easily get unexpected results.
The correct solution to this problem is to implement the ngOnDestroy hook in your component and destroy the instance of the editor, as shown here.
HalShaw commentedon Oct 16, 2017
@CHYMZ
I included divarea plugin in my project and solved this problem,but I got a new error.
core.es5.js:1020 ERROR RangeError: Maximum call stack size exceeded
at MouseEvent.eval [as returnValue] (eval at (:2:479), :228:28)
at MouseEvent.eval [as returnValue] (eval at (:2:479), :228:28)
at MouseEvent.eval [as returnValue] (eval at (:2:479), :228:28)
at MouseEvent.eval [as returnValue] (eval at (:2:479), :228:28)
at MouseEvent.eval [as returnValue] (eval at (:2:479), :228:28)
at MouseEvent.eval [as returnValue] (eval at (:2:479), :228:28)
at MouseEvent.eval [as returnValue] (eval at (:2:479), :228:28)
at MouseEvent.eval [as returnValue] (eval at (:2:479), :228:28)
at MouseEvent.eval [as returnValue] (eval at (:2:479), :228:28)
at MouseEvent.eval [as returnValue] (eval at (:2:479), :228:28)
what should I do now?
1 remaining item