feat(cabana): code editor, colour and mail image fields, mail branding and the image library

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-13 12:53:09 +01:00
parent b996a8fc83
commit 4fd2ed07eb
34 changed files with 1691 additions and 41 deletions

View File

@@ -137,6 +137,8 @@ cabana only checks whether the key resolves to a non-empty value (`env` state);
`type: richeditor` is accepted on a settings form. The settings save runs every submitted value through the same seaglass sanitizer as a controller save (see [Rich text](forms.md#rich-text)): clean HTML is stored byte for byte, otherwise the clean value is stored and the answer lists what was removed in `meta.notices`, which the admin shows under the field. A value that is not a string or `null` is a 422 on the field. `repeater` and `dependsOn` are still refused on settings forms, as they are on relation forms.
`type: colorpicker`, `type: mailimage` and `type: mailpreview` are also accepted on settings forms (they are built-in cabana types). `mailpreview` is valueless and never written. The Mail section entries `mail_templates`, `mail_layouts`, `mail_partials`, `mail_brand` and `mail_images` (category `backend::lang.settings.category_mail`) come from cabana's internal plugin when postcard's Mailer is published: Branding (`mail_brand`) is a settings form on `system_mail_brand_settings`; until that row exists mail uses `mail.brandCss`, and the first save switches to the compiled colours.
## Tabs
Settings fields take `tab` like record form fields. When any field declares one, the admin renders the tab strip in the page header, with the fields that have no `tab` on the default tab first; the form card sits inside the active tab's panel. After a 422 the first tab with an error is activated and shows its error count. Without any `tab` the page is unchanged.