Repository navigation
Restricting colors and fonts to a brand palette #422
Closed
gwhthompson
started this conversation in
Ideas
Replies: 1 comment
|
Thank you @gwhthompson for the useful idea and clean implementation. Both PRs are merged and I just released version Thank you again, and keep good ideas coming! 👍 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
We use the editor inside a Laravel app as the newsletter builder for a magazine. The person writing the emails isn't a designer, and the brand is a fixed palette plus two typefaces. Right now there's no way to keep them inside that: every color picker has the wheel and hex input, and the seven built-in fonts always show up next to
customFonts.Two options I'd like to add:
colors: { presets?: string[], allowCustom?: boolean }. Presets render as a grid of chips in the picker popover. WithallowCustom: falsethe wheel and hex input are removed and the chips are all you get.fonts.builtIns?: boolean | string[].falseremoves the built-ins from the picker, an array keeps a subset. Only the picker list changes; content already using an excluded font still renders with its normal fallback stack.Later I'd also like per-field
presetsonCustomBlockColorField, so a button color field can offer just the accent pair, but that can wait until the base is in.I've built both already: unit tests, docs (en + de), changesets, a playground scenario for each, and a Playwright spec. Nothing changes when the options aren't set. I can open the PRs now, or change names or placement first if you'd do it differently.
Here's the locked picker in the playground (Event Invitation template with a six-color palette and
allowCustom: false):All reactions