TX Text Control .NET Server

Javascript: TXTextControl.setIsTrackChangesEnabled Method

Method|Introduced in 28.0

Description

Sets a value indicating whether track changes is active or not.

Syntax

<void> TXTextControl.setIsTrackChangesEnabled(<boolean> value, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
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);