> For the complete documentation index, see [llms.txt](/llms.txt).
> The full corpus is at [llms-full.txt](/llms-full.txt).

# 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.

:::caution[Alpha]
This API should not be used in production and may be trimmed from a public release.
:::

## Properties

### kind

> **kind**: `"textBlock"`

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

***

### of?

> `optional` **of**: `ReadonlyArray`\<[`Span`](/api/editor/type-aliases/span/) \| [`InlineObject`](/api/editor/type-aliases/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?

> `optional` **render**: [`TextBlockRender`](/api/editor/type-aliases/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 `renderDefault`
  prop that returns the engine default when called.

***

### type

> **type**: `string`

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