# Javascript: FormattedText.selection Property

> Gets the current selection.

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

---

## On This Page

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

---

## Nearby

- **Previous:** [Javascript: FormattedText.paragraphs Property](https://docs.textcontrol.com/ds-server/reference/javascript/formattedtext/paragraphs-property/llms.txt)
- **Next:** [Javascript: FormattedText.subTextParts Property](https://docs.textcontrol.com/ds-server/reference/javascript/formattedtext/subtextparts-property/llms.txt)
