DS Server

Javascript: TXTextControl.getUndoActionName Method

Method|Introduced in 28.0

Description

Gets a string that represents the name of the action that will be performed when a call to the undo method is made. The property's value is null if there is no action that can be undone.

Syntax

<void> TXTextControl.getUndoActionName(<RequestStringCallback> 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.getUndoActionName in a practical document-editing workflow. It gets a string that represents the name of the action that will be performed when a call to the undo method is made. The property's value is null if there is no action that can be undone.

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

TXTextControl.getUndoActionName(
    function(result) {
        console.log("get undo action name result:", result);
    },
    onTxError
);