# InlineStyleCollection Object

> Contains all formatting styles in a Text Control document or part of the document.

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

---

### Description

Contains all [formatting styles](https://docs.textcontrol.com/ds-server/reference/javascript/inlinestyle/llms-full.txt) in a Text Control document or part of the document.

### Syntax

```javascript
InlineStyleCollection
```

### Examples

The following example demonstrates `InlineStyleCollection` in a practical document-editing workflow. It contains all formatting styles in a Text Control document or part of the document.

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

TXTextControl.inlineStyles.getItem(
    "Heading 1",
    function(style) {
        if (!style) {
            console.warn("No inline style was returned.");
            return;
        }
        
        console.log("get item result:", style);
    },
    onTxError
);
```

---

## In This Section

- [Javascript: InlineStyleCollection.add Method](https://docs.textcontrol.com/ds-server/reference/javascript/inlinestylecollection/add-method/llms-full.txt): Adds a new style to the current document.
- [Javascript: InlineStyleCollection.getItem Method](https://docs.textcontrol.com/ds-server/reference/javascript/inlinestylecollection/getitem-method/llms-full.txt): Gets a style from the collection by the style's name.

---

## Nearby

- **Previous:** [Javascript: InlineStyle.resetToParagraph Method](https://docs.textcontrol.com/ds-server/reference/javascript/inlinestyle/resettoparagraph-method/llms-full.txt)
- **Next:** [Javascript: InlineStyleCollection.add Method](https://docs.textcontrol.com/ds-server/reference/javascript/inlinestylecollection/add-method/llms-full.txt)
