I
Registry
testedThe single source of truth for which block and mark types exist and how they behave. Immutable: built once via {@link createRegistry}; {@link extendRegistry} returns a new registry. The {@link Schema} is projected from the definitions.
Signature
ts
interface RegistryProperties
| Property | Type | Description |
|---|---|---|
blocksreadonly | ReadonlyMap<string, BlockDefinition> | — |
marksreadonly | ReadonlyMap<string, MarkDefinition> | — |
schemareadonly | Schema | — |
getBlock | (type: string) => BlockDefinition | undefined | — |
getMark | (type: string) => MarkDefinition | undefined | — |
listBlocks | () => readonly BlockDefinition[] | Definitions in registration order (drives slash menu / toolbars). |
listMarks | () => readonly MarkDefinition[] | — |
allMarks | () => readonly MarkDefinition[] | Alias of {@link listMarks}, for the inline renderer/parser. |
hasBlock | (type: string) => boolean | — |
hasMark | (type: string) => boolean | — |