editor.on('block:drag:stop') event doesn't work
Question
I am using this event many times in the application in the previous library. Now I have updated the library. I have updated the following libraries -
- Grapesjs Library
- Grapesjs-Preset-Webpage Library
- Grapesjs-Basic-Blocks Library
But it stops working now. Let me know if there is any change in this event.
Answers (3)
Hi @perfect-coders, with the latest version https://github.com/artf/grapesjs/releases/tag/v0.13.5 the HTML5 drag and drop is enabled by default (disableable by nativeDnd option) and unfortunately I wasn't able to keep such events with this approach. The new d&d module provides similar functionality but now it's more generic, therefore canvas:drop will be triggered with any component drop (from blocks or any other OS source).
So you have two options:
- Keep the new d&d module and replace your old
block:drag:stopevents with something this
editor.on('canvas:drop', (DataTransfer, model) => {
// ...
})
- Disable the new module
grapesjs.init({
//...
nativeDnd: false
})
Thanks for pointing this out, actually I'll update the changelog
Thanks very much for the quick answer. I always love your quick feedback. I have some investment options for you. Hope to hear from you soon.
This stumped me. The documentation is out of date
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1364
[Bug]: Error on multiple instances of grapesjs
Hello, I use Grapesjs in my reactJS application. I have a react component which is an instance of Grapesjs. So I can add this component in...
Issue #1617
[Question] How can I stop the drop from block:drag:start event? Also is there any event to listen Invalid target position?
First of all, I really appreciate your replies on my questions. Thank you for all. Question 1 : I've a situation where if a particular bloc...
Issue #1369
[BUG] Class of a block doesn't always show in the classes section
Hello everyone, I have added many custom blocks and gave the same css class to all the images in those blocks. Let's call it for now 'image...
Issue #812
Layers Manager doesn't work with several editors
Hi again! As I comment in a previous question, We're working with several editors in the same window. The issue we're facing now is that la...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.