TextRun extends Element

The API model used to edit text.

Methods

remove()

Removes the Element itself.

var run = editor.getAPIModelById('id');
run.remove();

replace(html)

Replaces the element itself with the HTML String passed as an argument.

var run = editor.getAPIModelById('id');
run.replace('<span>TextRun replaced</span>');

setText(text)

Set the text string value passed as an argument to the text run.

var run = editor.getAPIModelById('id');
run.setText('This is what goes into the text run.');