Javascript: TXTextControl.getControlChars Method
Description
Gets whether the control characters are visible or not.
Syntax
<void> TXTextControl.getControlChars(<RequestBooleanCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | The callback function that receives the requested value. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates TXTextControl.getControlChars in a practical document-editing workflow. It gets whether the control characters are visible or not.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.getControlChars(
function(result) {
if (result) {
console.log("get control chars is available.");
} else {
console.warn("get control chars is not available in the current document state.");
}
},
onTxError
);