DS Server

Javascript: TXTextControl.setPermanentControlChars Method

Method|Introduced in 28.0

Description

Sets a value indicating which control characters are shown permanently on the screen.

Syntax

<void> TXTextControl.setPermanentControlChars(<PermanentControlChar> permanentControlChars, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
permanentControlChars

Specifies which control characters are shown permanently on the screen.

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.setPermanentControlChars in a practical document-editing workflow. It sets a value indicating which control characters are shown permanently on the screen.

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

TXTextControl.setPermanentControlChars(
    TXTextControl.PermanentControlChar.Space,
    function() {
        console.log("set permanent control chars completed.");
    },
    onTxError
);