Issue #1797πŸ’¬ AnsweredOpened Feb 14, 2019by arachnosoft0 reactions

Weird issue with internal drag&drop - Dropped contents === "null"

Quick answerby artf

Thanks for the report @arachnosoft BTW I'm able to reproduce it, but only once the first CKEditor instance is activated, can you confirm?

Read full answer below ↓

Question

Hi @artf , I'm facing a very strange issue related to HTML5 drag & drop. When I select some mixed contents within grapesjs, including editable text contents and the surrounding components as a whole selection with the mouse, the dropped (copied) contents is sometimes "null" (a string carrying the "null" text value, not a JavaScript null). I've managed to reproduce the issue with the Newsletter demo, with Chrome 71.0.3578.98. I don't know whether it happens with other browsers, or not... When the issue arises, I've noticed that, when catching the canvas:dragdata event, the result.content varia...

Answers (3)

artfβ€’ Feb 16, 2019

Thanks for the report @arachnosoft BTW I'm able to reproduce it, but only once the first CKEditor instance is activated, can you confirm?

arachnosoftβ€’ Feb 18, 2019

Yeah @artf , seems to be the exact test case... If I refresh the page to get a clean context, empty the canvas, drop a Grid component (quite complex one), select some of its text and surrounding cells WITHOUT activating CKEditor, and drag/drop it from the text, it's working correctly. But as soon a...

artfβ€’ Feb 21, 2019

I noticed that a new CKEditor instance was being created into the DOM each time a new component is edited, even though the CKEditor plugin uses CKEditor's inline() method. I don't know if this is "by-design", or if it could explain that kind of issue. Yeah this is how their inline plugins works but...

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 β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.