---
url: >-
  https://plugin.stripo.email/extensions/reference/nodes/ImmutableHtmlTextNode.md
---
# 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`](./BaseImmutableHtmlNode.md)

## Methods

### getTextContent()

Retrieves the text content of the node.

```typescript
getTextContent(): string | undefined
```

**Returns:** `string | undefined` - The text content, or `undefined` if the node has no content

**Example:**

```typescript
const text = textNode.getTextContent();
console.log(`Text: "${text}"`);
```
