TextNode class
Class shows captions in text format or HTML format.
Constructor
constructor(text: с | string)
Creates object of class TextNode
.
text: TextNodeOptions | string
Text node content is defined either by string or structure
TextNodeOptions
:export type TextNodeOptions = { text: string, type?: TextNodeType };
text: string
— text node content.type?: 'text' | 'html'
— content type: text or HTML.
Methods
Method | Description | Available from version |
---|---|---|
getText(): ?string | Returns text node content. | |
getType(): 'text' | 'html' | null | Returns content type. | |
isNullable(): boolean | Returns true when text node content is not defined. | |
renderTo(element: HTMLElement): void | Inserts text node content into specified DOM-node (element ). |
© «Bitrix24», 2001-2024