How can I stop the drop from block:drag:start event? Also is there any event to listen Invalid target position?
Question 1 : I've a situation where if a particular block is already in the canvas, I can't let that block to be added again. What I'm doing is, I'm listing to block:drag:start and compares if the component is already dropped (in gjs-components), I got success till now, but how to prevent the drag event right there? I...
Read full answer below ↓Question
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 block is already in the canvas, I can't let that block to be added again. What I'm doing is, I'm listing to block:drag:start and compares if the component is already dropped (in gjs-components), I got success till now, but how to prevent the drag event right there?
Question 2 : When a component is bound to specific tag/component, where can listen when the invalid drop happens?
Answers (2)
Question 1 : I've a situation where if a particular block is already in the canvas, I can't let that block to be added again. What I'm doing is, I'm listing to block:drag:start and compares if the component is already dropped (in gjs-components), I got success till now, but how to prevent the drag...
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #905
[Question] need to find nessesary event.
Hello to all! When dragging block into canvas, and drop it: ... we have an event to detect, what block we drop in. ?: but when i drop block...
Issue #1464
Customizing the Component Position
First of all thank you guys for this awesome library, And I have one Clarification that is how do i customize the drop position example if...
Issue #1951
[QUESTIONS] change or add event on add component from block
is it possible ?, change the drag and drop event to on click when adding a new component, I want to add components by clicking the block th...
Issue #1683
How to change id/class when new element drop on editor or render element with dynamic ip?
Hello @artf , Hope you are doing well. I have two questions regards dynamic blocks adding, 1) Is it possible to render the block with dynam...
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 →Related tutorials
In-depth guides on the same topic.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.