Issue #3169Opened December 7, 2020by mrobertshaw1 reactions

BUG:

Question

Hi There

I am trying to implement an editor where certain sections of the page are editable / droppable etc (i.e a mixed page where some elements are dynamic and others aren't). I am having a lot of success by using the data-gjs attributes to block this behaviour generally on the static elements however I don't seem to be able to disable drop on the container element itself? i.e. I am binding my instance to the body element of the page using fromElement: true which has data-gjs-droppable set to false but I am still able to drag blocks anywhere onto the page? Am I missing something here or is this by design?

Thanks a lot

Mark

Answers (2)

mrobertshawDecember 14, 20201 reactions

This is immensely helpful. Thank you for responding so quickly and for your fantastic, clever and well designed product which is a massive help to our product.

artfDecember 14, 20200 reactions

Hi @mrobertshaw the main element is intended as the editor container and not the wrapper. You have to use this option if you need to edit the wrapper's props:

grapesjs.init({
 ...
 domComponents: {
  wrapper: { droppable: false, ... }
 }
}) 

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...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.