Javascript: TXTextControl.getCommentHighlightMode Method
Description
Gets the global comment highlight mode.
Syntax
<void> TXTextControl.getCommentHighlightMode(<RequestHighlightModeCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Receives the property value. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates TXTextControl.getCommentHighlightMode in a practical document-editing workflow. It gets the global comment highlight mode.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.getCommentHighlightMode(
function(result) {
if (!result) {
console.warn("No highlight mode was returned.");
return;
}
console.log("get comment highlight mode result:", result);
},
onTxError
);