Fields
Rich Text Field
A WYSIWYG editor for markdown content with optional MDX support
The rich-text field stores markdown content with a WYSIWYG editor. Supports text formatting, links, images, tables, and custom embedded components (with MDX).
Usage
{
type: 'rich-text',
name: 'body',
label: 'Body',
isBody: true,
}Options
| Property | Type | Description |
|---|---|---|
type | 'rich-text' | Required. |
name | string | Field identifier. |
label | string | Display label in the editor. |
isBody | boolean | When true, maps to the document body. |
templates | Template[] | Enable MDX with custom components. |
toolbarOverride | string[] | Customize toolbar buttons. |
Type Signature
interface RichTextField {
type: 'rich-text'
name: string
label?: string
isBody?: boolean
templates?: Template[]
toolbarOverride?: Array<
'heading' | 'bold' | 'italic' | 'link' | 'image' |
'quote' | 'ul' | 'ol' | 'code' | 'codeBlock' | 'table'
>
}Examples
Toolbar Override
Limit the toolbar to specific formatting options:
{
type: 'rich-text',
name: 'body',
label: 'Body',
isBody: true,
toolbarOverride: ['heading', 'bold', 'italic', 'link'],
}With MDX Components
Embed custom React components in the content:
{
type: 'rich-text',
name: 'body',
label: 'Body',
isBody: true,
templates: [
{
name: 'Callout',
label: 'Callout',
fields: [
{ type: 'string', name: 'type', options: ['info', 'warning'] },
{ type: 'string', name: 'text', ui: { component: 'textarea' } },
],
},
],
}Notes
Reserved Name
Don't use "children" as a field name — it conflicts with internal APIs.
Tables only support single-line cells (markdown limitation).