Issue #422✓ SolvedOpened Oct 15, 2017by cmcintosh8 reactions

Prevent editing some components

Quick answerby artf4

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)

👍 Most helpfulartfOct 17, 2017

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

cmcintoshOct 17, 2017

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

artfOct 20, 2017

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.

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.