DS Server

Javascript: TXTextControl.getIsHyphenationEnabled Method

Method|Introduced in 28.0

Description

Gets a value indicating whether hyphenation is active or not.

Syntax

<void> TXTextControl.getIsHyphenationEnabled(<RequestBooleanCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives whether hyphenation is active or not.

errorCallback

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

Examples

The following example demonstrates TXTextControl.getIsHyphenationEnabled in a practical document-editing workflow. It gets a value indicating whether hyphenation is active or not.

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

TXTextControl.getIsHyphenationEnabled(
    function(result) {
        if (result) {
            console.log("get is hyphenation enabled is available.");
        } else {
            console.warn("get is hyphenation enabled is not available in the current document state.");
        }
    },
    onTxError
);