I
NodeSpec
Schema contribution of a block type.
Signature
ts
interface NodeSpecProperties
| Property | Type | Description |
|---|---|---|
contentreadonly | ContentKind | Content model (text / container / atom). |
attrs?readonly | Readonly<Record<string, import("./attr-spec").AttrSpec<import("..").AttrValue>>> | undefined | Attribute specs (defaults + validation). |
group?readonly | string | undefined | Group name for membership tests (e.g. `'block'`, `'list'`). |
defining?readonly | boolean | undefined | Keep this block's type/identity when merged into (e.g. code-block). |
code?readonly | boolean | undefined | Raw multiline text: Enter inserts a newline instead of splitting (code-block). |
isolating?readonly | boolean | undefined | Selection and merge cannot cross this block's boundary. |
toDOM?readonly | ((node: Node) => DOMOutputSpec) | undefined | Serialize a node of this type to a DOM description (HTML export). |
parseDOM?readonly | readonly ParseRule[] | undefined | Rules for parsing DOM into a node of this type (paste / import). |