[FEATURE REQUEST] Custom styles that add/remove custom classes?
Question
Currently, all the style manager values that you change for an element simply update a <style> tag inline in the HTML. Is it possible to change this behavior so that changing the CSS values adds or removes custom classes to the element?
A good reason for this is Bootstrap 4. 99% of Bootstrap customization involves simply adding classes to the element to alter various things like margins, padding, display values, etc.
Is it possible to do this? If not is this a valid feature request?
Answers (3)
It's already possible with Classes section (you can remove/toggle/update them)

Have you considered that the potential target audience for such a tool (think eCommerce merchandisers) has no idea what "classes" are in HTML and would be able to greatly benefit from having simple dropdown menus to choose from predefined settings?
Have you considered that the potential target audience for such a tool (think eCommerce merchandisers) has no idea what "classes" are in HTML and would be able to greatly benefit from having simple dropdown menus to choose from predefined settings?
Yeah sure, indeed I've planned to make this part less "class-oriented" but for any solution I'll take it will be always too much opinionated, so I think it'd be better creating your own solution by looking at the Selectors API and make a UI (select, tags, etc.) which fits better your needs
Related Questions and Answers
Continue research with similar issue discussions.
Issue #661
Class attribute not removed
Hello ! I noticed a problem with style manager when we add/remove classes. When we remove all classes it doesn't remove then from the gener...
Issue #1746
[FEATURE REQUEST] Don't Strip off html , head and body tags from imported html
Hi Team, We have noticed grapesjs has customised the actual template uploaded, by stripping off the html, head and body tags and adds new s...
Issue #908
[FEATURE REQUEST] Add custom classes to panels and other editor elements
When using a UI framework that provides custom classes, it would be nice to be able to use these classes on things like panels, so you woul...
Issue #843
[QUESTION] - CssComposer - removes unused classes
hi @artf , I import a html , using import from grapesjs-preset-newsletter, with some css classes inside the <style> tag. After the import,...
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.