Issue #1515πŸ’¬ AnsweredOpened Oct 15, 2018by thanhtunguet0 reactions

Destroy editor but does not delete the editor object.

Quick answerby artf

Do you mean the editor object from GrapesJS.editors? The one you remove manually with delete GrapesJS.editors[this.id];?

Read full answer below ↓

Question

Hello, I've created a wrapper Component of grapesjs for React. When the component is unmounted, it will destroy the editor by calling the destroy method. When my app render a new editor. (User goes back from 2 to 1, then go to 2 again, see my screenshot), the old destroyed editor seems to still exists. It affects to the rendering of the new one. In console, I found out that the destroy method does not delete the editor instance, it just can not be re-rendered but it still exists. If the app continues to render new ones, it will continue to render wrong again and again... Did I do something wr...

Answers (3)

artfβ€’ Oct 26, 2018

Do you mean the editor object from GrapesJS.editors? The one you remove manually with delete GrapesJS.editors[this.id];?

thanhtunguetβ€’ Oct 27, 2018

I tried to destroy the editor manually and by API (Editor.destroy) but they did not work. The editor seems not to be fully destroyed.

artfβ€’ Nov 3, 2018

Ok then, we have already an issue related to the destroy method #1501 If you need to add something do it there

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins β†’
Premium option

Premium plugins ship with support, regular updates, and production-ready features β€” save days of integration work.

Browse premium plugins β†’

Related tutorials

In-depth guides on the same topic.

All tutorials β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.