TextBlock
TextBlock =
object
Defined in: packages/editor/src/renderers/renderer.types.ts:197
A text block registration. The text block _type is 'block' at the
top level. Positional overrides nested in a container’s of array can
register a different _type to render at that lexical scope.
defineTextBlock opts the text block into the new render pipeline.
The consumer’s render callback owns the outer wrapper entirely:
the engine emits data-pt-* attributes only - no pt-* CSS classes,
no legacy data-block-* attributes - and the block-level
renderStyle/renderListItem/renderBlock props on
<PortableTextEditable> do not compose under this registration.
Span-level render props - renderDecorator, renderAnnotation,
renderPlaceholder, and range decorations - keep working. They fire
on the spans inside children regardless of which text block outer
wrapper renders them.
Properties
Section titled “Properties”kind:
"textBlock"
Defined in: packages/editor/src/renderers/renderer.types.ts:198
optionalof:ReadonlyArray<Span|InlineObject>
Defined in: packages/editor/src/renderers/renderer.types.ts:212
Inline-content positional overrides. A Span or InlineObject
placed here scopes the inline render to this text block (or any
text block of this type if registered at the top level).
render?
Section titled “render?”
optionalrender:TextBlockRender
Defined in: packages/editor/src/renderers/renderer.types.ts:206
Outer render. Two modes:
- omitted: fall through to global registered render (or engine default)
- function: use this render. The function receives a
renderDefaultprop that returns the engine default when called.
type:
string
Defined in: packages/editor/src/renderers/renderer.types.ts:199