Appearance
ImmutableHtmlTextNode
Interface for immutable HTML text nodes in email templates.
typescript
interface ImmutableHtmlTextNode extends BaseImmutableHtmlNode
Description
ImmutableHtmlTextNode
represents text content within HTML elements. It provides methods to access and work with text nodes, which are the actual textual content displayed in email templates. Text nodes contain no markup, only plain text.
Import
typescript
import { ImmutableHtmlTextNode } from '@stripoinc/ui-editor-extensions';
Inheritance
Extends: BaseImmutableHtmlNode
Methods
getTextContent()
Retrieves the text content of the node.
typescript
getTextContent(): string
Returns: string
- The text content
Throws: Error
if the node is not found
Example:
typescript
const text = textNode.getTextContent();
console.log(`Text: "${text}"`);