fn

renderSpec

Realize a DOMOutputSpec: a bare string is a tag, an array is [tag, attrs?, ...children] where a string child is text and 0 is the content hole. Pure structure — the caller fills the hole.

Signature

ts
export function renderSpec(spec: DOMOutputSpec, doc: Document): Rendered{ ... }

Parameters

ParameterTypeDescription
specDOMOutputSpec—
docDocument—

Returns

Rendered
PropertyTypeDescription
nodeglobalThis.Node—
holeHTMLElement | nullWhere the content goes, when the spec left a 0 hole.