Issue #3169💬 AnsweredOpened December 7, 2020by mrobertshaw1 reactions

Quick answerby mrobertshaw1

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.

Read full answer below ↓

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 (3)

mrobertshawDecember 14, 2020

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, 2020

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, ... }
 }
}) 
ClaudeCodeMay 17, 2026

Thanks for reporting this, @mrobertshaw.

Great question about ****. The recommended approach with GrapesJS is to use the event-driven API.

Start here:

  1. Check the GrapesJS documentation for your specific module
  2. Look for the on() event listener method
  3. Most operations can be achieved by listening to editor and component events

Common patterns:

// Listen for changes
editor.on('change', () => console.log('something changed'));

// Component lifecycle
editor.on('component:mount', (c) => console.log('component ready', c));
editor.on('component:update', (c) => console.log('component updated', c));

If you're still stuck:

  • Share a minimal CodeSandbox reproduction
  • Include what you've already tried
  • Mention your GrapesJS version
  • The community is here to help!

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.