Skip to content

RichTextElement

Defined in: packages/core/src/fields/richtext/types.ts:26

A single block or inline node in a RichTextDocument. type identifies the node kind ("p", "h1", "img", "a", "table", …) and children holds its nested nodes or text leaves. Any other key is a node-specific property (e.g. an image’s url, a link’s target) set by whichever editor plugins are enabled — narrow with a specific element interface (e.g. richtext-plate’s ImageElement) to access them.

[prop: string]: unknown

Node-specific properties set by editor plugins.

children: (RichTextText | RichTextElement)[]

Defined in: packages/core/src/fields/richtext/types.ts:30

Nested nodes or text leaves.


type: string

Defined in: packages/core/src/fields/richtext/types.ts:28

The node kind, e.g. "p", "h1", "img", "a", "table".