Interface NodeConstructorParams

Parameters for constructing a new Node object.

interface NodeConstructorParams {
    attributes?: {
        [key: string]: string;
    };
    name: string;
    value?: string;
}

Properties

attributes?: {
    [key: string]: string;
}

The attributes of the node.

Ref: Node.attributes

Type declaration

  • [key: string]: string

Example

`[img width=100 height=100]https://example.com/image.png[/img]` -> `{ width: "100", height: "100" }`
name: string

The name of the node.

Ref: Node.name

Example

`[b]Hello World![/b]` -> `b`
value?: string

The value of the node.

Ref: Node.value

Example

`[color=red]Hello World![/color]` -> `red`

Generated using TypeDoc