Skip to content
This page is available as Markdown at /api/editor/type-aliases/decoratorrenderprops.md. For the full documentation index, see /llms.txt, or the complete corpus at /llms-full.txt.

DecoratorRenderProps

DecoratorRenderProps = object

Defined in: packages/editor/src/renderers/renderer.types.ts:90

A decorator’s render function. Receives the decorator name and wraps the styled text it applies to. Range and selection decorations can split one span into several leaves, so this fires once per decorator on each leaf, not once per span, nested in the span’s marks order.

The render is a plain function call, not a component: do not call hooks in it. When you need hooks, return an element of your own component: render: (props) => <MyDecorator {...props} />.

children: ReactElement

Defined in: packages/editor/src/renderers/renderer.types.ts:91


decorator: string

Defined in: packages/editor/src/renderers/renderer.types.ts:96

The decorator name, e.g. 'strong'. A '*' render discriminates on this.


focused: boolean

Defined in: packages/editor/src/renderers/renderer.types.ts:97


path: Path

Defined in: packages/editor/src/renderers/renderer.types.ts:101

Path of the span carrying the decorator.


readOnly: boolean

Defined in: packages/editor/src/renderers/renderer.types.ts:102


renderDefault: (props) => ReactElement

Defined in: packages/editor/src/renderers/renderer.types.ts:109

Render this position with the engine’s default wrapper. See ContainerRenderProps.renderDefault. The default is identity: the engine applies no decorator markup of its own.

DecoratorRenderProps

ReactElement


selected: boolean

Defined in: packages/editor/src/renderers/renderer.types.ts:103