fn
createDefaultRegistry
testedBatteries-included registry with the default blocks and marks.
Signature
ts
export function createDefaultRegistry(){ ... }Returns
Registry| Property | Type | Description |
|---|---|---|
blocks | ReadonlyMap<string, BlockDefinition> | — |
marks | ReadonlyMap<string, MarkDefinition> | — |
schema | 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 listMarks, for the inline renderer/parser. |
hasBlock | (type: string) => boolean | — |
hasMark | (type: string) => boolean | — |