Missing option to erase style options
Hi @mingodad there is actually an option which enables the possibility to clear values but it's still a work in progress (have to deal better with composite types)
Read full answer below βQuestion
Hello ! In several style options there is no way to erase/reset several options like:font-family : if we select a font to experiment and decided that we do not want any custom there is no way to reset it.dimensions-width: if we experiment with some value and do not want any custom value we can erase the value but we still get a style in the css "width:auto" that in some cases mess up the layout (could we have the property removed completely ?). The same apply to several other properties we need a default options in all of then to be able to remove/erase then from the generated styles. Cheers !
Answers (3)
Hi @mingodad there is actually an option which enables the possibility to clear values but it's still a work in progress (have to deal better with composite types)
grapesjs.init({
...
styleManager: {
clearProperties: true,
...
}
})
@benvmatheson
const sm = editor.StyleManager;
sm.getConfig().clearProperties = 1;
sm.render();
A SCSS style tutorial would be nice
Related Questions and Answers
Continue research with similar issue discussions.
Issue #544
Add select with optgroup
Hello @artf I have recently started using grapeJs and found it awesome. Can you please help me on How can I add dropdown(select) with optgr...
Issue #2097
New views question
Hello all, Is there is any simple way to add a new view right next to the style manager? I would like to create a new view that will show s...
Issue #2193
Reset trait on edit the content of a custom component
Hi, I have a custom component which content can be changed by switching trait select options, but also can be edited similar to the text co...
Issue #2989
How to append button in custom div
Hi @artf Is there any way to append all the defaults buttons of grapesjs in custom div like the same way we are append the style manager. h...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins β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.
Tutorial
Messaging on gjs.market: talk to a studio before you buy, not after
We've launched private messaging between buyers and studios. One thread per buyerβstudio pair, the whole history in one place.
Tutorial
How to integrate GrapesJS into a Django app (complete guide 2026)
Embed GrapesJS in a Django project: render the editor in a template, persist content to a view with CSRF, store the project JSON, and export HTML/CSS.
Tutorial
How to integrate GrapesJS into a Laravel app (complete guide 2026)
Embed the GrapesJS drag-and-drop editor in a Laravel app: render it in a Blade view, persist content to a controller with CSRF, and export clean HTML/CSS.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.