-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
🧪 EnhancementSpinning up new features in the lab.Spinning up new features in the lab.
Description
For simple RichText formats, we should explore registering these via JSON instead of needing to write JavaScript. For example, consider some simple inline text where you want to change the typography to something custom. It could be registered in a /richtext/example.json file like so:
{
"title": "Example",
"slug": "x3p0/example",
"tagName": "span",
"className": "example",
"styles": {
"typography": {
"fontSize: "var(--wp--preset--font-size--sm)",
"fontFamily": "var(--wp--preset--font-family--primary)",
"textTransform": "uppercase"
}
}
}Maybe there's even a potential PHP equivalent. Or just a PHP version in general (may be a better place to start).
This would be a very limited version of what you could accomplish with JS, but for really straightforward styling and no additional options, it'd give a lot of freedom.
Related Gutenberg tickets:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
🧪 EnhancementSpinning up new features in the lab.Spinning up new features in the lab.