TX Text Control .NET Server

Javascript: TXTextControl.setControlChars Method

Method|Introduced in 28.0

Description

Sets whether the control characters are visible or not.

Syntax

<void> TXTextControl.setControlChars(<boolean> controlChars, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
controlChars

Specifies if control characters are visible or not.

callback

Optional. Is called when the operation completed.

errorCallback

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

Examples

The following example demonstrates TXTextControl.setControlChars in a practical document-editing workflow. It sets whether the control characters are visible or not.

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

TXTextControl.setControlChars(
    true,
    function() {
        console.log("set control chars completed.");
    },
    onTxError
);