Issue #1004💬 AnsweredOpened April 4, 2018by gabrigcl0 reactions

Enhance "draggable" attribute of components in order to allow excluding certain components when wildcard "*" is set for draggable components

快速解答by artf

You mean something like draggable: "*:not(your-component)"?

Read full answer below ↓

Question

Hi. I wish to enhance "draggable" attribute of components in order to allow excluding certain components when wildcard "*" is set for draggable components. For example, according to my case:

I need the "video" and "image" component to be draggable on every component, except the "my_custom_component". My suggestion is to add a new attribute "draggable_excluding" or to enable two fields in "draggable" attribute as an object: draggable: { components: c, //c typeof string or array exclude: e //e typeof string or array }

Thanks in advance.

Answers (3)

artfApril 5, 2018

You mean something like draggable: "*:not(your-component)"?

gabrigclApril 5, 2018

Yes, I liked your thinking!

artfApril 7, 2018

Inside draggable and droppable properties you can pass any CSS-like query string so it's already possible

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

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.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.