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

RegisteredContainer

RegisteredContainer = object

Defined in: packages/editor/src/schema/container-types.ts:38

Public view of a registered editable container, surfaced on EditorContext.containers.

Two array properties named of live on the same entry with different semantics:

  • field.of is the SCHEMA-DECLARED list of types this container’s child field accepts (from @portabletext/schema’s OfDefinition). Tells you what the schema permits as children.
  • of (top-level on RegisteredContainer) is the list of POSITIONAL CHILD REGISTRATIONS - nested RegisteredContainer or RegisteredPositional entries - that override the global registration when the engine descends into this parent. Tells you which child renderings are scoped to this parent.

The full container registration (including the render callback) lives on the editor’s internal ResolvedContainers map and is not exposed on the public context.

Two top-level entries with the same _type cannot coexist - the register handler warns on duplicates. But the SAME _type registered in two different parents’ of arrays is supported as a feature; resolveContainerAt walks the positional tree using the path to return the entry that applies at a given position.

field: ChildArrayField

Defined in: packages/editor/src/schema/container-types.ts:41


kind: "container"

Defined in: packages/editor/src/schema/container-types.ts:39


optional of: ReadonlyArray<RegisteredContainer | RegisteredPositional>

Defined in: packages/editor/src/schema/container-types.ts:42


type: string

Defined in: packages/editor/src/schema/container-types.ts:40