Allow dynamic droppable configuration using a function
Associated PR: https://github.com/artf/grapesjs/pull/3393
Read full answer below βQuestion
I have a requirement where I cannot use selectors to determine if an element is droppable. For example: The "child" component must be within a "parent" component, however if the child component contains a ref attribute it can only be dragged into other parent containers that match the same ref value as the current parent. Given the above markup, the child component can be dropped into the last container but not the container with the ref of 5678. However the second child element could be dropped into any of the parent components. This would easily be accomplished if droppable would allow a fu...
Answers (3)
Associated PR: https://github.com/artf/grapesjs/pull/3393
@artf do have any questions regarding this feature or the approach taken in the PR?
Thanks for reporting this, @rywilson28. Great suggestion about FEAT: Allow dynamic droppable configuration using a function! While this specific feature isn't yet in the core API, there are several ways to achieve similar behavior. Using the event system: Alternative approaches: Listen to selector:...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3561
Enhanced Shadow DOM Support
What are you trying to add to GrapesJS? Better Shadow DOM support, allowing developers to render GrapesJS inside a Shadow element without h...
Issue #3140
Interactive component in canvas
I am building a quiz builder plugin using grapesjs. I was wondering if we can add a component which is interactive and adds new components...
Issue #3688
How to customize a component
I read this document https://grapesjs.com/docs/modules/Components.html#define-custom-component-type and tried to write the following code....
Issue #3231
How to change gjs-ckeditor-format component
hi guys, we all know that gjs-ckeditor-plugin working with [data-gjs-type]="text" components. I wanna know , could we change this option? I...
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.