Skip to main content

AddText

Adds some text to the current paragraph.

Syntax

expression.AddText(sText);

expression - A variable that represents a ApiParagraph class.

Parameters

NameRequired/OptionalData typeDefaultDescription
sTextOptionalstring""The text that we want to insert into the current document element.

Returns

ApiRun

Example

This example adds some text to the paragraph.

let doc = Api.GetDocument();
let paragraph = doc.GetElement(0);
paragraph.AddText("This is just a sample text. Nothing special.");