Issue #2100💬 AnsweredOpened June 26, 2019by fmr4110 reactions

Change the class style (like color: white to color: red)

快速解答by artf

I think you're looking for this: https://grapesjs.com/docs/api/css_composer.html#setrule eg. editor.CssComposer.setRule('.my-class', { color: 'red' });

Read full answer below ↓

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 Screenshot_8

Answers (1)

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 →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.