# Javascript: TextField.getHighlightMode Method

> Gets a value indicating when the text field is highlighted.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 28.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: TextField.getHighlightMode Method
- **386 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/textfield/gethighlightmode-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/textfield/gethighlightmode-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/textfield/gethighlightmode-method/llms-full.txt

---

### Description

Gets a value indicating when the text field is highlighted.

### Syntax

```javascript
<void> TextField.getHighlightMode(<RequestHighlightModeCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Receives the condition for highlighting. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `TextField.getHighlightMode` in a practical document-editing workflow. It gets a value indicating when the text field is highlighted.

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

function inspectHighlightMode(textField) {
    textField.getHighlightMode(
        function(result) {
            if (!result) {
                console.warn("No highlight mode was returned.");
                return;
            }
            
            console.log("get highlight mode result:", result);
        },
        onTxError
    );
}
```

---

## Nearby

- **Previous:** [Javascript: TextField.getHighlightColor Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/textfield/gethighlightcolor-method/llms-full.txt)
- **Next:** [Javascript: TextField.getID Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/textfield/getid-method/llms-full.txt)
