Javascript: TrackedChange.getHighlightMode Method
Description
Gets a value indicating whether the tracked change is highlighted.
Syntax
<void> TrackedChange.getHighlightMode(<RequestBooleanCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Receives as parameter whether the tracked change is highlighted. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates TrackedChange.getHighlightMode in a practical document-editing workflow. It gets a value indicating whether the tracked change is highlighted.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.textParts.getMainText(function(mainText) {
const trackedChanges = mainText.trackedChanges;
trackedChanges.getItem(function(trackedChange) {
if (!trackedChange) {
console.warn("No tracked change is available at the current input position.");
return;
}
trackedChange.getHighlightMode(
function(result) {
if (result) {
console.log("get highlight mode is available.");
} else {
console.warn("get highlight mode is not available in the current document state.");
}
},
onTxError
);
}, onTxError);
}, onTxError);