Prevent editing some components
Yeah, @MichaelKlemersson is right currently you have to set them manually on any element. Another trick would be to update all children via model But what I think would be the best it's some kind of property which propagates (suggestions for a better term are welcome) properties from the parent to its children, eg. wh...
Read full answer below ↓Question
I would like to prevent users from editing the internal components of specific components.
IE lets say I have an element called Drupal-Block
<div data-block>
... html inside ..
</div>
I want to prevent the users from editing the ... html inside... bit
Answers (3)
Yeah, @MichaelKlemersson is right currently you have to set them manually on any element. Another trick would be to update all children via model But what I think would be the best it's some kind of property which propagates (suggestions for a better term are welcome) properties from the parent to...
Yes i think that the propagation idea is great. To be clear the reason im looking for this is im building out a module for Drupal 8 that will allow creating themes via the GrapeJS tool. In Drupal you have elements called Blocks, and my thought was to block of editing of those on the Main editor, an...
An example you can use in the demoSelect an element (eg. some section) Execute this in console
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3409
Custom component property that is not a trait
I would like to create a custom component with a property that will be updated by specific code, but I don't want this property to be visib...
Issue #1588
[QUESTION]
Hi guys and thank you for your magnificent work and this API! I have a question about the box, which wraps all components after saving. For...
Issue #490
Prevent modifying specific image components
I have a use case where I would like to make some specific components completely locked down (i.e. not resizable, not draggable, not copyab...
Issue #3346
Can I develop my own stylemanager and bind the properties conveniently?
I want to build my own stylemanager useing some UI framework like Element-UI to make a beauty UI quickly. But how can I bind the properties...
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
GrapesJS custom components guide (2026)
Define custom GrapesJS components with DomComponents.addType: detection with isComponent, a model with traits and defaults, and a view for canvas behavior.
Tutorial
How to integrate GrapesJS into a Svelte app (complete guide 2026)
A step-by-step guide to embedding the GrapesJS drag-and-drop editor in a SvelteKit app — install, mount it client-side, persist content, and export clean HTML/C
Tutorial
GrapesJS vs Gutenberg: How to Build a Custom WordPress Page Builder
Compare GrapesJS and Gutenberg, learn when to use each, and follow a step-by-step guide to build a production WordPress page builder with GrapesJS.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.