question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Removing editor with Angular 4

See original GitHub issue

Do 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:closed
  • Created 6 years ago
  • Comments:22

github_iconTop GitHub Comments

2reactions
ghostcommented, Apr 24, 2018

@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.

2reactions
bagocommented, Mar 10, 2018

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found