R
I

Schema

The compiled schema: the set of known node/mark specs plus attribute coercion helpers. Projected from the registry (the registry is the SSOT).

Signature

ts
interface Schema

Properties

PropertyTypeDescription
nodesreadonlyReadonlyMap<string, NodeSpec>
marksreadonlyReadonlyMap<string, MarkSpec>
nodeSpec(type: string) => NodeSpec | undefined
markSpec(type: string) => MarkSpec | undefined
defaultAttrs(type: string) => AttrsDefault attrs for a block type (all defaults applied).
coerceAttrs(type: string, attrs?: Attrs) => AttrsFill defaults and drop unknown keys for a block type.
defaultMarkAttrs(type: string) => AttrsDefault attrs for a mark type.
coerceMarkAttrs(type: string, attrs?: Attrs) => AttrsFill defaults and drop unknown keys for a mark type.