> This page is for Designer API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.webflow.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.webflow.com/_mcp/server.

# Set Text Content

> Set text content for an element.

## `element.setTextContent(content)`

Set text content for an element that supports text content.

## Syntax

```typescript
element.setTextContent(content: string): Promise<null>>
```

## Parameters

* **`content`**: `string` - Text to add to the element

## Returns

**Promise\<`null`>**

A Promise that resolves to `null`.

## Example

```typescript
// Get Selected Element
const selectedElement = await Webflow.getSelectedElement()

if (selectedElement?.textContent) {

  // Set and print text content
  const text = await selectedElement.setTextContent("Lorem Ipsum")
  console.log(selectedElement.textContent)

}
```

## Designer Ability

| Designer Ability | Locale | Branch | Workflow | Sitemode |
| :--------------- | :----- | :----- | :------- | :------- |
| **canEdit**      | Any    | Any    | Canvas   | Any      |

```
```