TX Text Control .NET Server

Javascript: ParagraphFormat.setJustification Method

Method|Introduced in 26.0

Description

Sets the kind of justification in documents containing Arabic or Hebrew characters.

Syntax

<void> ParagraphFormat.setJustification(<Justification> justification, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
justification

The kind of justification in documents containing Arabic or Hebrew characters.

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.setJustification in a practical document-editing workflow. It sets the kind of justification in documents containing Arabic or Hebrew characters.

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

TXTextControl.paragraphFormat.setJustification(
    TXTextControl.Justification.Spaces,
    function() {
        console.log("set justification completed.");
    },
    onTxError
);