Javascript: TXTextControl.setIsTrackChangesEnabled Method
Description
Sets a value indicating whether track changes is active or not.
Syntax
<void> TXTextControl.setIsTrackChangesEnabled(<boolean> value, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| value | The property value. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example enables change tracking and confirms the resulting editor state.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.setIsTrackChangesEnabled(true, function() {
TXTextControl.getIsTrackChangesEnabled(function(isEnabled) {
console.log("Track changes enabled:", isEnabled);
}, onTxError);
}, onTxError);