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
| Parameter | Type | Description |
|---|---|---|
spec | DOMOutputSpec | — |
doc | Document | — |
Returns
Rendered| Property | Type | Description |
|---|---|---|
node | globalThis.Node | — |
hole | HTMLElement | null | Where the content goes, when the spec left a 0 hole. |