In Style Manager, Allow Requiring the Default Setting
Hi @anlumo, did you try to extend float definition with something like this requires: { position: ['static'] }?
Read full answer below βQuestion
What are you trying to add to GrapesJS? The CSS property float only makes sense for position: static; elements, which happens to be the default. I only want to display the float radio selector if the position is not set to anything else. However, if I add require: ['static']; to the property definition, the setting is only shown when I explicitly set the position to static, not when I leave it at the default (which is also static). Is there an alternative at the latest version?[ ] Yes (describe the alternative)[X] No Is this related to an issue?[ ] Yes (Give a link to the issue)[X] No
Answers (3)
Hi @anlumo, did you try to extend float definition with something like this requires: { position: ['static'] }?
Yes. It seems to work fine after reloading the page, but when you toggle the position it stops working and looks like in the screenshot. The definition is as follows:
Thanks for reporting this, @anlumo. Great suggestion about FEAT: In Style Manager, Allow Requiring the Default Setting! While this specific feature isn't yet in the core API, there are several ways to achieve similar behavior. Using the event system: Alternative approaches: Listen to selector:add f...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3407
FEAT: CSS Grid
What are you trying to add to GrapesJS? Add support for CSS Grid (display: grid;) and its various options. I have no immediate personal nee...
Issue #3561
FEAT: Enhanced Shadow DOM Support
What are you trying to add to GrapesJS? Better Shadow DOM support, allowing developers to render GrapesJS inside a Shadow element without h...
Issue #3121
FEAT/ISSUE: CSS standards
I'm going to say this is both a feature request as I get into some parts of it, but also a bit of an issue. I would say it looks bad to hav...
Issue #3269
Translating html string
Great library! It meets all the requirements but one: website text translation. I've searched high and low through the issue queue and docs...
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 βBrowse Plugin Categories
Jump directly to plugin category pages on the marketplace.