Removing editor with Angular 4
See original GitHub issueDo you want to request a feature or report a bug? BUG What is the current behavior? doing this :
tinymce.remove(this.editor);
generates this error :
ERROR Error: Node cannot be null or undefined
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via fiddle.tinymce.com or similar.
I cannot use the fiddle since it’s an angular project.
I have an *ngIf
on my TinyMCE component. When it’s destroyed, the error above pops up.
What is the expected behavior?
Being able to destroy the tinymce instance
Which versions of TinyMCE, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE?
Using 4.7.1 Angular 4.4.3
Issue Analytics
- State:
- Created 6 years ago
- Comments:22
Top Results From Across the Web
angularjs - Remove tinymce 4 editor from set of editors
I'm creating a custom AngularJS directive that wraps a tinymce 4 editor. The issue arises when I try to remove a tinymce editor...
Read more >Getting started with Angular RichTextEditor component
This section explains the steps to create a simple Rich Text Editor component and configure its available functionalities in Angular.
Read more >[#9] Editing and Deleting Data - Getting Started with AngularJS
Looking for Angular 2? Check out the same tutorial using Angular 2 at Angularcasts! https://goo.gl/CVqAkWGet the course ...
Read more >Angular compiler options
By default, the compiler replaces decorators with a static field in the class, which allows advanced tree-shakers like Closure compiler to remove unused...
Read more >Angular - Cheat Sheet
Removes or recreates a portion of the DOM tree based on the showSection expression. <li *ngFor="let item of list">, Turns the li element...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@bago I believe it to be the same as the one you are experiencing. I replicated the error and came up with my fix within my fork of the Mosaico master branch by clicking somewhere within the editor immediately after Knockout bindings have completed but before TinyMCE instances have finished initializing.
I’m experiencing similar issues with latest tinymce in a SPA where I instantiate dozen of inline tinymce concurrently. It seems everything works fine with tinymce <= 4.5.8 and it randomly breaks on >= 4.6.0 versions.
I also see other weirds behaviours around and not only this Node cannot be null while removing… it seems the editor are initialized with wrong references. I’ve not been able to make it reproducible via fiddle but I wanted to share the version number delimiting the issue.
Can others confirm they are also using multiple editable in the same page and inline mode and that downgrading to 4.5.8 fixes it?