Docs

This page isn't translated yet

next

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

FieldTypeLabelDefaultNotes
_tierselectOptions: root (Root), region (Region), fragment (Fragment), slot (Slot), stack (Stack)
alignSelfradioAlign SelfcenterShown when siblingData?._tier==="stack"; Required; Shown when siblingData?.setSelfAlign; Options: start (Start), center (Center), end (End), stretch (Stretch)
contentrichTextContent
flex1checkboxFlex 1falseShown when siblingData?._tier==="stack"
growcheckboxGrowfalseShown when siblingData?._tier==="stack"
messageuiShown when siblingData?._tier==="stack"
setSelfAligncheckboxDefine Self AlignmentfalseShown when siblingData?._tier==="stack"
shrinkcheckboxShrinkfalseShown 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.