Parent reference in block:drag
block:drag can't contain the reference to the component as it's not yet created before being dropped
Read full answer below βQuestion
I wonder if it is possible to get the parent and/or index during block:drag event for the resulting component, similar to the parent attribute in the component:drag event? It seems like the event argument passed does not contain any reference to parent. The reason I am asking is that I am working on a solution to preview the presumed drop result of a dragged block, using a box rather than the green line indicating the drop position.
Answers (1)
block:drag can't contain the reference to the component as it's not yet created before being dropped
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1951
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 #1813
Can't get correct component from editor.on events callback
I am using editor's events to get component after some action like component:add, block:drag:stop, but in both events I can't get my compon...
Issue #1709
Is it possible to affect child component's styling through parent component's style manager?
Hello there! Awesome project and thanks for your contribution. I would like to know if it is possible to change the styling of a child comp...
Issue #3235
"component:update" does not trigger when components are moved
Taken from https://github.com/artf/grapesjs/blob/dev/src/editor/index.js#L33 component:update - Triggered when a component is updated (move...
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.
Tutorial
Vanilla GrapesJS vs GrapesJS With Plugins: What You Actually Get Out of the Box (2026)
New to GrapesJS? See exactly what the stock editor gives you, where it falls short, and which plugins close the gaps β a beginner-friendly 2026 comparison
Tutorial
Lighthouse for GrapesJS: Audit Accessibility and SEO Without Leaving the Editor
Live WCAG 2.1/2.2 accessibility auditor + SEO manager for GrapesJS. Every finding is bound to the exact component β click to select, then one-click fix.
Tutorial
GrapesJS DevTools: A Developer Panel Inside Your Editor
If you've ever debugged GrapesJS with console.log(editor.getSelected()) and a dozen throwaway event listeners β this post is for you.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.