# Javascript: TextPart.selection Property

> Obsolete. This property will be removed in one of the next versions. The getter returns an object of type Selection. The setter changes the selection to a given start position and a given length using an object of type SelectionBounds.

> **Note:** This is deprecated and should not be used in new work.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 24.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: TextPart.selection Property
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/textpart/selection-property/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/textpart/selection-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/textpart/selection-property/llms-full.txt

---

## On This Page

- [Description](https://docs.textcontrol.com/ds-server/reference/javascript/textpart/selection-property/#description)
- [Syntax](https://docs.textcontrol.com/ds-server/reference/javascript/textpart/selection-property/#syntax)
- [Examples](https://docs.textcontrol.com/ds-server/reference/javascript/textpart/selection-property/#examples)

---

## Nearby

- **Previous:** [Javascript: TextPart.removeSubTextPart Method](https://docs.textcontrol.com/ds-server/reference/javascript/textpart/removesubtextpart-method/llms.txt)
- **Next:** [Javascript: TextPart.type Property](https://docs.textcontrol.com/ds-server/reference/javascript/textpart/type-property/llms.txt)
