R
I

NodeSpec

Schema contribution of a block type.

Signature

ts
interface NodeSpec

Properties

PropertyTypeDescription
contentreadonlyContentKindContent model (text / container / atom).
attrs?readonlyReadonly<Record<string, import("./attr-spec").AttrSpec<import("..").AttrValue>>> | undefinedAttribute specs (defaults + validation).
group?readonlystring | undefinedGroup name for membership tests (e.g. `'block'`, `'list'`).
defining?readonlyboolean | undefinedKeep this block's type/identity when merged into (e.g. code-block).
code?readonlyboolean | undefinedRaw multiline text: Enter inserts a newline instead of splitting (code-block).
isolating?readonlyboolean | undefinedSelection and merge cannot cross this block's boundary.
toDOM?readonly((node: Node) => DOMOutputSpec) | undefinedSerialize a node of this type to a DOM description (HTML export).
parseDOM?readonlyreadonly ParseRule[] | undefinedRules for parsing DOM into a node of this type (paste / import).