TX Text Control .NET Server

Javascript: TXTextControl.getCanRedo Method

Method|Introduced in 28.0

Description

Informs whether an operation can be re-done using the Redo method.

Syntax

<void> TXTextControl.getCanRedo(<RequestBooleanCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
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.getCanRedo in a practical document-editing workflow. Informs whether an operation can be re-done using the Redo method.

function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

TXTextControl.getCanRedo(
    function(result) {
        if (result) {
            console.log("get can redo is available.");
        } else {
            console.warn("get can redo is not available in the current document state.");
        }
    },
    onTxError
);