Movatterモバイル変換


[0]ホーム

URL:


  • Preparing search index...
  • The search index is not available
bbcode-ast

Class Node

A BBCode node. This represents a tag and it's children.

Hierarchy (view full)

Implements

Constructors

constructor

Properties

attributes

attributes:AttributeType

The attributes of the tag.

Ref:AttributeType

Implementation ofAttributeHolder.attributes

children

children:BaseNode[] = []

The children of the node.

Ref:ChildrenHolder.children

Inherited fromChildrenHolderNode.children

name

name:string

The name of the tag.

Example

`[b]Hello World![/b]` ->`b`

OverridesChildrenHolderNode.name

Optionalvalue

value?:string

The value of the tag.

Ref:ValueHolder.value

Implementation ofValueHolder.value

Methods

addChild

clone

makeOpeningTag

  • makeOpeningTag():string
  • Makes the opening tag of the node. This will include the name, and all attributes.

    Returnsstring

    The opening tag of the node.

nodeTree

  • nodeTree(indentWidth?):string
  • Converts the node into a tree-like overview of all children.

    Parameters

    • indentWidth:number = 2

      The number of spaces to indent the output. Defaults to2.

    Returnsstring

    The tree-like overview of all children.

    Inherited fromChildrenHolderNode.nodeTree

ProtectednodeTreeChildren

ProtectednodeTreeHeading

setAttribute

setValue

toBBCode

toString

  • toString():string
  • Converts the node into a textual representation of the node as BBCode.A node should return the exact same string as the input toParser.parse providedindented isfalse.

    Returnsstring

    The textual representation of the node as BBCode.

    OverridesChildrenHolderNode.toString

Settings

Member Visibility

Theme

On This Page

Generated usingTypeDoc


[8]ページ先頭

©2009-2025 Movatter.jp