TextBlock
TextBlock =
object
Defined in: packages/editor/src/renderers/renderer.types.ts:260
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 and no
legacy data-block-* attributes.
Span-level rendering - decorator and annotation registrations,
renderPlaceholder, and range decorations - keeps working. It
fires 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:261
optionalof:ReadonlyArray<Span|InlineObject|Decorator|Annotation>
Defined in: packages/editor/src/renderers/renderer.types.ts:279
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).
Decorator and Annotation entries scope those renders the
same way: the decorator or annotation renders through this entry
inside the text block, and through the global registration
everywhere else.
render?
Section titled “render?”
optionalrender:TextBlockRender
Defined in: packages/editor/src/renderers/renderer.types.ts:269
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:262