fn
createNode
testedConstruct a Node, generating an id when not supplied.
Signature
ts
export function createNode(type: string, options: CreateNodeOptions ={ ... }Parameters
| Parameter | Type | Description |
|---|---|---|
type | string | — |
options? | CreateNodeOptions | — |
Returns
Node| Property | Type | Description |
|---|---|---|
id | string | — |
type | string | — |
attrs | Attrs | — |
content | Content | — |