# RequestTextCharCallback Function

> Callback function for requests expecting a character object.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Function
- **Path:** DS Server > Reference > JavaScript API > RequestTextCharCallback Function
- **306 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/requesttextcharcallback/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/requesttextcharcallback/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/requesttextcharcallback/llms-full.txt

---

### Description

Callback function for requests expecting a [character](https://docs.textcontrol.com/ds-server/reference/javascript/textchar/llms-full.txt) object.

### Syntax

```javascript
function(<TextChar> textChar)
```

### Examples

The following example demonstrates `RequestTextCharCallback` in a practical document-editing workflow. Callback function for requests expecting a character object.

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

function requestTextCharCallback(textChar) {
    console.log("text char:", textChar);
}

function useRequestTextCharCallback(textChars) {
    textChars.getItem({ x: 1440, y: 720 }, true, requestTextCharCallback, onTxError);
}
```

---

## Nearby

- **Previous:** [RequestTabTypesCallback Function](https://docs.textcontrol.com/ds-server/reference/javascript/requesttabtypescallback/llms-full.txt)
- **Next:** [RequestTextFieldCallback Function](https://docs.textcontrol.com/ds-server/reference/javascript/requesttextfieldcallback/llms-full.txt)
