DS Server

Javascript: ParagraphFormat.getLeftIndent Method

Method|Introduced in 26.0

Description

Gets the distance, in twips, between the left edge of the Text Control and the left edge of the text.

Syntax

<void> ParagraphFormat.getLeftIndent(<RequestNumberCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives the distance, in twips, between the left edge of the Text Control and the left edge of the text.

errorCallback

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

Examples

The following example demonstrates ParagraphFormat.getLeftIndent in a practical document-editing workflow. It gets the distance, in twips, between the left edge of the Text Control and the left edge of the text.

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

TXTextControl.paragraphFormat.getLeftIndent(
    function(result) {
        console.log("get left indent result:", result);
    },
    onTxError
);