Skip to content

Editor / DOM Helper / setText

Function: setText()

ts
function setText(selector, text): void;

Sets the text content of a DOM element.

Parameters

ParameterTypeDescription

selector

string

The selector for the element.

text

string

The text to set as the content.

Returns

void

Example

ts
setText('#label-id', 'Updated text');

Version v1.33.1 - Built on 2026-03-28