Weird issue with internal drag&drop - Dropped contents === "null"
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)
Thanks for the report @arachnosoft BTW I'm able to reproduce it, but only once the first CKEditor instance is activated, can you confirm?
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...
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.
Issue #3128
Drop a component at the position of the mouse is clicked
What are you trying to add to GrapesJS? When a component is dropped, stay at the position of the mouse is clicked. Describe your feature re...
Issue #1605
Can we implement Paste as Rich text editor options in Rte?
hi @artf I've gone through this Drag and Drop Editor and what an amazing work. I also read your docs and I tried to extend rich text editor...
Issue #1247
Text disappear after creating a new type
Hello! I am creating a new block that will open a modal during the creation (drag and drop https://github.com/artf/grapesjs/issues/174 real...
Issue #2260
Drag and drop of selected text displays null
Hello, I have a problem with GrapesJS editor because when some text is selected in a component and when you drop it outside component it sh...
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 βBrowse Plugin Categories
Jump directly to plugin category pages on the marketplace.