ContainerRenderProps
ContainerRenderProps =
object
Defined in: packages/editor/src/renderers/renderer.types.ts:34
A container’s render function receives a node and renders an element
that wraps its editable children. The render is positional: it fires for
nodes of type whose parent permits this container at arrayField.
node is PortableTextObject because containers cannot register the
built-in 'span' or 'block' types (those are leaves and text blocks
respectively).
Properties
Section titled “Properties”attributes
Section titled “attributes”attributes:
Record<string,unknown>
Defined in: packages/editor/src/renderers/renderer.types.ts:35
children
Section titled “children”children:
ReactElement
Defined in: packages/editor/src/renderers/renderer.types.ts:36
focused
Section titled “focused”focused:
boolean
Defined in: packages/editor/src/renderers/renderer.types.ts:37
node:
PortableTextObject
Defined in: packages/editor/src/renderers/renderer.types.ts:38
path:
Path
Defined in: packages/editor/src/renderers/renderer.types.ts:39
readOnly
Section titled “readOnly”readOnly:
boolean
Defined in: packages/editor/src/renderers/renderer.types.ts:40
renderDefault()
Section titled “renderDefault()”renderDefault: (
props) =>ReactElement
Defined in: packages/editor/src/renderers/renderer.types.ts:55
Render this position with the engine’s default wrapper. Call from inside a custom render to fall back to or wrap the default:
render: ({renderDefault, ...rest}) => renderDefault(rest)The default is the engine’s minimal wrapper. It does not chain back to a globally-registered render: PTE has one user layer plus positional overrides, and the engine default is the canonical fallback at any position.
Parameters
Section titled “Parameters”ContainerRenderProps
Returns
Section titled “Returns”ReactElement
selected
Section titled “selected”selected:
boolean
Defined in: packages/editor/src/renderers/renderer.types.ts:41