# Javascript: TXTextControl.getCanRedo Method

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

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 28.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: TXTextControl.getCanRedo Method
- **356 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/getcanredo-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/getcanredo-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/getcanredo-method/llms-full.txt

---

### Description

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

### Syntax

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

### Parameters

| Parameter | Description |
|---|---|
| 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.

```javascript
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
);
```

---

## Nearby

- **Previous:** [Javascript: TXTextControl.getCanPrint Method](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/getcanprint-method/llms-full.txt)
- **Next:** [Javascript: TXTextControl.getCanStyleFormat Method](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/getcanstyleformat-method/llms-full.txt)
