# Javascript: TextField.getDeleteable Method

> Gets whether a text field can be deleted by the end-user while a TX Text Control document is being edited.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 28.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: TextField.getDeleteable Method
- **403 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/textfield/getdeleteable-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/textfield/getdeleteable-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/textfield/getdeleteable-method/llms-full.txt

---

### Description

Gets whether a text field can be deleted by the end-user while a TX Text Control document is being edited.

### Syntax

```javascript
<void> TextField.getDeleteable(<RequestBooleanCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Receives whether a text field can be deleted. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `TextField.getDeleteable` in a practical document-editing workflow. It gets whether a text field can be deleted by the end-user while a TX Text Control document is being edited.

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

function inspectDeleteable(textField) {
    textField.getDeleteable(
        function(result) {
            if (result) {
                console.log("get deleteable is available.");
            } else {
                console.warn("get deleteable is not available in the current document state.");
            }
        },
        onTxError
    );
}
```

---

## Nearby

- **Previous:** [Javascript: TextField.getContainsInputPosition Method](https://docs.textcontrol.com/ds-server/reference/javascript/textfield/getcontainsinputposition-method/llms-full.txt)
- **Next:** [Javascript: TextField.getDoubledInputPosition Method](https://docs.textcontrol.com/ds-server/reference/javascript/textfield/getdoubledinputposition-method/llms-full.txt)
