Issue #4247πŸ’¬ AnsweredOpened April 7, 2022by gustavohleal0 reactions

Components disappearing/not being rendered at cloning, moving or adding

Quick answerby artf

Sorry but demo-mjml is a plugin and not related directly to the core. As I see no issues with the default renderer of components that might be related to the mjml renderer of components and I have no reason to keep this issue open. Despite that, if anybody is able to identify the issue and it's some how related to the...

Read full answer below ↓

Question

GrapesJS version

  • I confirm to use the latest version of GrapesJS

What browser are you using?

Chromium v96

Reproducible demo link

https://grapesjs.com/demo-mjml.html

Describe the bug

How to reproduce the bug?

  1. Add a one column component
  2. Select the column
  3. Click the copy button on the toolbar
  4. Repeat the steps 2 and 3 with the components two columns, three columns and navbar-link inside the navbar component.
  5. Move the component or repeat step 3 with one of the components and the first clone will appear

What is the expected behavior? When clicking the copy button, the clone must appear on the side of the original.

What is the current behavior? The clone is not rendered inside the canvas, but appears on the exported code.

When debugging from the render function of those components, it seems that the component is rendered for a few steps and then disappear inside a function from grapes.js. The video below show a example with de navbar and navbar-link components. As you can see, after returning the rendered component to grapes.js it disappears after a few steps.

https://user-images.githubusercontent.com/22385451/162276077-ca0c7fbf-992a-4e09-91ca-30b2cde1617e.mp4

Code of Conduct

  • I agree to follow this project's Code of Conduct

Answers (2)

artfβ€’ April 13, 2022

Sorry but demo-mjml is a plugin and not related directly to the core. As I see no issues with the default renderer of components that might be related to the mjml renderer of components and I have no reason to keep this issue open. Despite that, if anybody is able to identify the issue and it's some how related to the core, I'm open to fix that.

ClaudeCodeβ€’ May 17, 2026

Thanks for reporting this, @gustavohleal.

Great question about Components disappearing/not being rendered at cloning, moving or adding. The recommended approach with ProseMirror is to use the event-driven API.

Start here:

  1. Check the GrapesJS documentation for your specific module
  2. Look for the on() event listener method
  3. Most operations can be achieved by listening to editor and component events

Common patterns:

// Listen for changes
editor.on('change', () => console.log('something changed'));

// Component lifecycle
editor.on('component:mount', (c) => console.log('component ready', c));
editor.on('component:update', (c) => console.log('component updated', c));

If you're still stuck:

  • Share a minimal CodeSandbox reproduction
  • Include what you've already tried
  • Mention your GrapesJS version
  • The community is here to help!

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.