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.ofis the SCHEMA-DECLARED list of types this container’s child field accepts (from@portabletext/schema’sOfDefinition). Tells you what the schema permits as children.of(top-level onRegisteredContainer) is the list of POSITIONAL CHILD REGISTRATIONS - nested RegisteredContainer or RegisteredLeaf 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.
Properties
Section titled “Properties”field:
ChildArrayField
Defined in: packages/editor/src/schema/container-types.ts:40
optionalof:ReadonlyArray<RegisteredContainer|RegisteredLeaf>
Defined in: packages/editor/src/schema/container-types.ts:41
type:
string
Defined in: packages/editor/src/schema/container-types.ts:39