feat(record-form): richtext field type #99
Loading…
Reference in a new issue
No description provided.
Delete branch "task/pienter-ui__rich-text-field__richtext-field-type"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Stacked on the RichText component PR.
{ type: 'richtext'; placeholder? }inRecordFormField, rendered byRecordFieldslike the other built-ins, also inside a BlockEditor block and in view mode.defineAsyncComponentbehind a Skeleton: the editor is its own chunk (about 123 kB gzip) and a form without a rich text field never fetches it.record-layout.css).docs/cms/backend-contract.mddocuments the value: the HTML allow-list, barehrefschemes, empty is'', the backend sanitises.chore(examples)commit): blogbodyand page sectionbodyare rich text with formatted fixtures; the mock API requires a blog body;CMS_PLAYGROUND.mdno longer excludes rich text.Checks: typecheck, lint, format, package tests (54), playground tests (86), both builds green. Create, edit, view, BlockEditor sections, a validation issue and the unsaved-changes guard exercised in Chrome.
Not verified: the automatic focus move to an invalid rich text field, mobile layouts, clicking links in view mode. Known: a brief layout shift while the chunk loads.
`{ type: 'richtext' }` renders RichText with the same label, hint, error, busy and read-only handling as the other built-ins, also inside a BlockEditor block. RecordFields loads it with `defineAsyncComponent` behind a Skeleton, so a form without a rich text field never fetches Tiptap. A rich text field spans the full Panel row like a textarea. The backend contract documents the value: an HTML string limited to the formatting set, bare `href` links, sanitised by the backend.