QUESTION : custom style properties to change class
Question
Hi,
Thanks for this good editor.
In my project, I want to adjust classes of components using the style manager. For example, I am using bootstrap and I want the user to be able to apply classes such as bg-danger, bg-primary from a drop box instead of input the class name manually.
I am aware that I can do it using trait (and it works well) but it is more consistent that styling control goes in the style manager part (and also it is too much option to put in the traits part)
I saw that it is possible to add custom type in the style manager but it always to update a single CSS property. Is it possible to use this custom types to update class attribute of the component ?
Answers (2)
There is an option which allows you to indicate which target to select (classes or component-specific style)
https://github.com/artf/grapesjs/pull/2474 (in your case componentFirst should be disabled)
Unfortunately, the selector manager's UI itself it's not easily customizable but I think you should be able to create one from scratch by relying on events and API
thanks for your answer :)
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2814
[QUESTION] Custom panel button that dynamically Enable/Disable user scripts
Hello and thanks for sharing such a good project. I'm trying to customize some things in the editor but I have some questions that I would...
Issue #2563
[Question]After adding the forms plugin in grapesjs we are able to see bootstrap class properties in the stylemanager panel
In our project, we are using the grapesjs. In that, we have used the grapesjs Form. When we drag and drop the form to the grapesjs canvas....
Issue #1709
[QUESTION] Is it possible to affect child component's styling through parent component's style manager?
Hello there! Awesome project and thanks for your contribution. I would like to know if it is possible to change the styling of a child comp...
Issue #3328
How can I update the nodeValue (text value) of components by inputs forms
Hello. Grapesjs is a great tool. Thanks for it. I want to update the text value of a component by inputs, how can I do that?? if a user fil...
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.