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)
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.
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.
Issue #1504
[Question] Dynamic height
Hi: Is it possible to have an instance of GrapesJS with dynamic height, as in, the editor adjusts to the content size. What I'm trying to d...
Issue #4196
BUG: Ids gets changed while trying to set components on the canvas using json
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link no link Desc...
Issue #3207
Form is not submitting
I am trying to create as custom block. But the form is not submitting when i use components inside content. I am able to get all the form d...
Issue #3878
BUG: Not able to rename the page name and page id if we are using multipage concept
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome v9Reproducible demo link Not thereDes...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.