Javascript: TXTextControl.setControlChars Method
Description
Sets whether the control characters are visible or not.
Syntax
<void> TXTextControl.setControlChars(<boolean> controlChars, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| 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
);