Issue #1428✓ SolvedOpened Sep 15, 2018by peakrams5 reactions

Define or hide properties for specific components

Quick answerby juanj2

I'm not sure if this is the optimal way of doing it but you can listen to the event component:selected and if the component selected is the one you want you can add a new sector. Then you need to listen to the event component:deselected and if the component deselected is the one from before you remove the extra sector...

Read full answer below ↓

Question

Hi,

I'm wondering if there is the possibility to define properties for specific components. I mean, when I select the component Image I would like that in the style manager panel the section relative to the Typography is not shown; in the same way, when I select a Table component I would like to see in the style manager a property My Property in the Dimension panel that I want available only for the Table component. Is this possible?

Thank you!

Answers (3)

👍 Most helpfuljuanjSep 15, 2018

I'm not sure if this is the optimal way of doing it but you can listen to the event component:selected and if the component selected is the one you want you can add a new sector. Then you need to listen to the event component:deselected and if the component deselected is the one from before you rem...

artfSep 16, 2018

Actually, you can also rely on a few Component's properties made exactly for this purpose:stylable - True if it's possible to style the component. You can also indicate an array of CSS properties which is possible to style, eg. ['color', 'width'], all other properties will be hidden from the style...

artfSep 16, 2018

@peakrams the warning is actually there but the Github's Markdown doesn't let you apply custom styles to make it more visible ¯\_(ツ)_/¯

schermata 2018-09-16 alle 18 41 39

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.