File

src/elements/textitem/nodes.ts

Description

A style node represents a node that has presentation styles applied to it, or acts as a parent node when multiple child nodes are present.

The frontend optimizes the node structure such that nested style nodes are collapsed together if possible.

Implements

TextItemNode

Index

Properties
Methods

Constructor

constructor(children: TextItemNode[], styles: PresentationStyles)
Parameters :
Name Type Optional
children TextItemNode[] No
styles PresentationStyles No

Properties

Public Readonly children
Type : TextItemNode[]
Public Readonly styles
Type : PresentationStyles

Methods

filter
filter(style: string)
Parameters :
Name Type Optional
style string No
Returns : StyleNode[]
find
find(style: string)
Parameters :
Name Type Optional
style string No
toPlainText
toPlainText(options?: literal type)
Parameters :
Name Type Optional
options literal type Yes
Returns : string
visit
visit(visitor: TextItemNodeVisitor<T | R>, context: T)
Type parameters :
  • T
  • R
Parameters :
Name Type Optional
visitor TextItemNodeVisitor<T | R> No
context T No
Returns : R

results matching ""

    No results matching ""