Rich Text block
A rich-text item for Stack blocks, edited with the fragment editor.
On this page
The Rich Text block is the text item of a Stack: a fragment editor holding headings, paragraphs, lists and inline blocks.
Where it is offeredLink to this section
Offered as an item inside the Stack block rather than in an editor's block menu. Its content uses the fragment editor.
FieldsLink to this section
| Field | Type | Label | Default | Notes |
|---|---|---|---|---|
_tier | select | Options: root (Root), region (Region), fragment (Fragment), slot (Slot), stack (Stack) | ||
alignSelf | radio | Align Self | center | Shown when siblingData?._tier==="stack"; Required; Shown when siblingData?.setSelfAlign; Options: start (Start), center (Center), end (End), stretch (Stretch) |
content | richText | Content | ||
flex1 | checkbox | Flex 1 | false | Shown when siblingData?._tier==="stack" |
grow | checkbox | Grow | false | Shown when siblingData?._tier==="stack" |
message | ui | Shown when siblingData?._tier==="stack" | ||
setSelfAlign | checkbox | Define Self Alignment | false | Shown when siblingData?._tier==="stack" |
shrink | checkbox | Shrink | false | Shown when siblingData?._tier==="stack" |
Rendered outputLink to this section
Renders Heading, Paragraph, List and inline components inside a rich-text wrapper. The spacing model controls their rhythm.
ConverterLink to this section
Rich Text is rendered by renderStack, rather than by a standalone richText converter entry. It wraps the converted fragment children in a <div className="richtext"> and applies the item's grow, shrink and self-alignment classes. The fragment editor disables nested stacks in this field.
CustomizingLink to this section
Copy RichTextBlock into a project block definition to change its fields, then use that definition in a custom Stack items field. To change its frontend output, replace the parent stack converter through customBlocks; Rich Text is an item handled by that converter, so registering a richText converter alone does not change Stack output.
See Registering blocks for the configuration pattern and Converters for the renderer contract. A project converter used in client-mode live preview also needs browser registration.