DS Server

Javascript: ParagraphFormat.setTabLeaders Method

Method|Introduced in 29.0

Description

Sets an array containing the tab leaders in a paragraph. A tab leader defines how a tab gap is filled.

Syntax

<void> ParagraphFormat.setTabLeaders(<TabLeader[]> value, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
value

An array containing the tab leaders.

callback

Optional. Is called when the operation completed.

errorCallback

Optional. Is called when the operation failed with an error.

Examples

The following example demonstrates ParagraphFormat.setTabLeaders in a practical document-editing workflow. It sets an array containing the tab leaders in a paragraph. A tab leader defines how a tab gap is filled.

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

TXTextControl.paragraphFormat.setTabLeaders(
    TXTextControl.TabLeader.Period,
    function() {
        console.log("set tab leaders completed.");
    },
    onTxError
);