DS Server

Javascript: ParagraphFormat.setTabTypes Method

Method|Introduced in 26.0

Description

Sets an array containing the tab types in a paragraph.

Syntax

<void> ParagraphFormat.setTabTypes(<TabType[]> value, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
value

The tab types in a paragraph.

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.setTabTypes in a practical document-editing workflow. It sets an array containing the tab types in a paragraph.

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

TXTextControl.paragraphFormat.setTabTypes(
    TXTextControl.TabType.LeftTab,
    function() {
        console.log("set tab types completed.");
    },
    onTxError
);