resolveContainerAt
resolveContainerAt(
containers,value,path):RegisteredContainer|RegisteredLeaf|undefined
Defined in: packages/editor/src/schema/resolve-container-at.ts:37
Walk the editor value following path and return the
RegisteredContainer or RegisteredLeaf that applies
at path’s target position.
Resolution rules at each step:
-
Positional override. If the current parent declares the child’s
_typein itsof, the positional entry wins. Used to resolve same-_typeregistered under different parents with differentfieldvalues. -
Global fallback. If the parent has no positional override, fall back to the top-level entry for
_typeincontainers. -
Chain validity. If any ancestor along the path has no resolved container entry (unregistered or not reachable as a container at its position), return
undefined.
Returns undefined when the target’s _type is not registered
at this position. Returns a RegisteredLeaf when the target
resolves to a leaf in a positional of (terminal node with no
editable children).
Parameters
Section titled “Parameters”containers
Section titled “containers”readonly Node[]
Path
Returns
Section titled “Returns”RegisteredContainer | RegisteredLeaf | undefined