Issue #4195๐Ÿ’ฌ AnsweredOpened Mar 15, 2022by varadero1 reactions

Text disappears if pasted for a second time in text block

Quick answerby jmaks1โค 1

@artf The problem is relevant to the latest version. (v0.19.4) The bug occurs if you copy and paste a nested component while editing text. A regular paste (cmd + v) copies all html, including id, and after removing focus, html with identical id is deleted.

Read full answer below โ†“

Question

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome 99 Reproducible demo link https://grapesjs.com/demo.html Describe the bug How to reproduce the bug?Open https://grapesjs.com/demo.html and delete all sample sectionsPlace one "Text section"Open a text editor and type 3 lines of text. Something like this:Copy the 3 lines from the text editorGo back to GrapesJS demo page and double click the text section just before the word consecterur (other word would work too)Press CTRL+V to paste the textClick outside to commit the changesHover your mous...

Answers (4)

jmaks1โ€ข Jun 23, 2022

@artf The problem is relevant to the latest version. (v0.19.4)

The bug occurs if you copy and paste a nested component while editing text. A regular paste (cmd + v) copies all html, including id, and after removing focus, html with identical id is deleted.

varaderoโ€ข Mar 15, 2022

I can confirm that this problem occurs only with Grapesjs 0.18.3 - I downgraded to 0.18.2 and the problem does not occur. Older versions are OK too.

jmaks1โ€ข Jun 23, 2022

I can confirm that this problem occurs only with Grapesjs 0.18.3 - I downgraded to 0.18.2 and the problem does not occur. Older versions are OK too.

in version 0.18.2, nested components were not created inside the text.

GJSBlockโ€ข May 17, 2026

Thanks for reporting this, @varadero. Great question about Text disappears if pasted for a second time in text block. The recommended approach with GrapesJS is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module Look for the on() event listener method...

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.