DS Server

Javascript: FormattedText.lines Property

Property|Introduced in 28.0

Description

Gets a collection of all text lines.

Syntax

<LineCollection> FormattedText.lines

Examples

The following example demonstrates FormattedText.lines in a practical document-editing workflow. It gets a collection of all text lines.

function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

TXTextControl.textParts.getMainText(function(formattedText) {
    formattedText.lines.getCount(function(count) {
        console.log("lines count:", count);
    }, onTxError);
}, onTxError);

Limitations

Read Only.