fn
withContent
testedReturn a copy of node with new content.
Signature
ts
export function withContent(node: Node, content: Content): Node{ ... }Parameters
| Parameter | Type | Description |
|---|---|---|
node | Node | — |
content | Content | — |
Returns
Node| Property | Type | Description |
|---|---|---|
id | string | — |
type | string | — |
attrs | Attrs | — |
content | Content | — |