# SubTextPartCollection Object

> The SubTextPartCollection object represents a collection of subtextparts.

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

---

## On This Page

- [Description](https://docs.textcontrol.com/ds-server/reference/javascript/subtextpartcollection/#description)
- [Syntax](https://docs.textcontrol.com/ds-server/reference/javascript/subtextpartcollection/#syntax)
- [Examples](https://docs.textcontrol.com/ds-server/reference/javascript/subtextpartcollection/#examples)
- [Members](https://docs.textcontrol.com/ds-server/reference/javascript/subtextpartcollection/#members)

---

## In This Section

- [Javascript: SubTextPartCollection.add Method](https://docs.textcontrol.com/ds-server/reference/javascript/subtextpartcollection/add-method/llms.txt): Adds a new SubTextPart to the collection.
- [Javascript: SubTextPartCollection.AddResult Enumeration](https://docs.textcontrol.com/ds-server/reference/javascript/subtextpartcollection/addresult-enumeration/llms.txt): Specifies the result when a subtextpart has been added to the document.
- [Javascript: SubTextPartCollection.clear Method](https://docs.textcontrol.com/ds-server/reference/javascript/subtextpartcollection/clear-method/llms.txt): Removes all subtextparts from a Text Control document.
- [Javascript: SubTextPartCollection.getItem Method](https://docs.textcontrol.com/ds-server/reference/javascript/subtextpartcollection/getitem-method/llms.txt): Gets the subtextpart at the current text input position.
- [Javascript: SubTextPartCollection.remove Method](https://docs.textcontrol.com/ds-server/reference/javascript/subtextpartcollection/remove-method/llms.txt): Removes a subtextpart from the collection including all its nested subtextparts.

---

## Nearby

- **Previous:** [Javascript: SubTextPartCallbackData.subTextPart Property](https://docs.textcontrol.com/ds-server/reference/javascript/subtextpartcallbackdata/subtextpart-property/llms.txt)
- **Next:** [Javascript: SubTextPartCollection.add Method](https://docs.textcontrol.com/ds-server/reference/javascript/subtextpartcollection/add-method/llms.txt)
