[QUESTIONS] change the class style (like color: white to color: red)
Question
is it possible to change the class style (like color: white to color: red) in the trait, I create a new type, I want to change the style in onChange event. I have tried using setcustomparsercss but it doesn't work, Thanks

Answers (1)
I think you're looking for this: https://grapesjs.com/docs/api/css_composer.html#setrule
eg. editor.CssComposer.setRule('.my-class', { color: 'red' });
Related Questions and Answers
Continue research with similar issue discussions.
Issue #996
[QUESTIONS] change attribute value that is generated through trait
Now, let's consider that I wrote new into the trait value but in attribute :items, I want to append prefix like item.text. to that value So...
Issue #1930
[QUESTIONS] change 2 attributes with 1 trait
I have an input trait, I want to change the 2 attributes (name and type) on the selected input element, on canvas is appropriate, but in th...
Issue #3010
Asset Manager Configuration Is not Working
Hi, I tried all possible ways to change asset manager configuration, but it is not working as expected. Even I create a sample plugin but i...
Issue #1951
[QUESTIONS] change or add event on add component from block
is it possible ?, change the drag and drop event to on click when adding a new component, I want to add components by clicking the block th...
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.