Error after call `editor.destroy()`
Thanks for the report, I'll try to fix it in the next release @ershadul1 nope, there is a FrameWrapView (stuff around the iframe, like wrappers, tools for selection etc.), and inside there is a FrameView (the iframe itself), but probably for some remove ordering issue, the frame is removed before its wrapper.
Read full answer below ↓Question
Create editor instance
Try destroy
const editor = grapesjs.init({
container: '#gjs',
height: '100%',
storageManager: false
});
editor.destroy();
Got error

Answers (4)
Thanks for the report, I'll try to fix it in the next release @ershadul1 nope, there is a FrameWrapView (stuff around the iframe, like wrappers, tools for selection etc.), and inside there is a FrameView (the iframe itself), but probably for some remove ordering issue, the frame is removed before i...
https://github.com/artf/grapesjs/blob/0027dcd1194715eeaf4b24db878dd7ebac069cc4/src/canvas/view/FrameWrapView.js#L73 I'm seeing that the remove is used inside the remove itself. I don't understand. Was this a mistake? If I set this.frame = null the error goes away. Looking for an expert opinion here...
+1
Thanks for reporting this, @zgeist. The issue with Error after call editor.destroy() appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modifications overlap, creating an inconsistent state. What to try: Add a setTimeout...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3444
removeButton() causing error
Hi, I'm trying to remove a button from panel using this code editor.Panels.removeButton('options', 'fullscreen') . It removes the button bu...
Issue #3333
npm start not working
Hi, I want to develop the source code but I cannot get started. I got errors when start the project. Can anybody help me? Thank you very mu...
Issue #4784
Bug resize image
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? 108.0.5359.73Reproducible demo link https://...
Issue #4370
LayerManager becomes unresponsive after StorageManager.load()
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome 102Reproducible demo link https://cod...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →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.
Tutorial
Embed GrapesJS in Your SaaS: A Weekend Guide
Embed GrapesJS in your SaaS and ship a white-label page builder over a weekend. Honest tradeoffs, real code, and the plugins that close the UX gap.
Tutorial
Big Updates: TinyMCE 8 and Placeholder 2.0 for GrapesJS
In May we shipped major updates to two of our most popular GrapesJS plugins — TinyMCE Inline Text Editor and Placeholder.
Tutorial
Find the Right GrapesJS Plugin in Seconds: Smarter Discovery Is Live
We're shipping a set of discovery upgrades. New label filters, a proper compatibility switch for GrapesJS vs Studio, one-click and a smarter sort bar.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.