# TextChar Object

> The TextChar object represents a single character in a document.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Object
- **Introduced:** 28.0
- **Path:** DS Server > Reference > JavaScript API > TextChar Object
- **409 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/textchar/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/textchar/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/textchar/llms-full.txt

---

### Description

The TextChar object represents a single character in a document.

### Syntax

```javascript
TextChar
```

### Examples

The following example demonstrates `TextChar` in a practical document-editing workflow. The TextChar object represents a single character in a document.

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

function inspectTextChar(textChar) {
    textChar.getBounds(
        function(rect) {
            if (!rect) {
                console.warn("No rectangle was returned.");
                return;
            }
            
            console.log("get bounds result:", rect);
        },
        onTxError
    );
}
```

---

## In This Section

- [Javascript: TextChar.getBounds Method](https://docs.textcontrol.com/ds-server/reference/javascript/textchar/getbounds-method/llms-full.txt): Gets the bounding rectangle of the character.
- [Javascript: TextChar.getChar Method](https://docs.textcontrol.com/ds-server/reference/javascript/textchar/getchar-method/llms-full.txt): Gets the value of the character.
- [Javascript: TextChar.getNumber Method](https://docs.textcontrol.com/ds-server/reference/javascript/textchar/getnumber-method/llms-full.txt): Gets the character's number.

---

## Nearby

- **Previous:** [Javascript: TableRowCollection.remove Method](https://docs.textcontrol.com/ds-server/reference/javascript/tablerowcollection/remove-method/llms-full.txt)
- **Next:** [Javascript: TextChar.getBounds Method](https://docs.textcontrol.com/ds-server/reference/javascript/textchar/getbounds-method/llms-full.txt)
