# Javascript: TXTextControl.AutoBaseline Enumeration

> Specifies how text is automatically sub- or superscripted.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Enumeration
- **Introduced:** 30.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: TXTextControl.AutoBaseline Enumeration
- **408 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/autobaseline-enumeration/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/autobaseline-enumeration/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/autobaseline-enumeration/llms-full.txt

---

### Description

Specifies how text is automatically sub- or superscripted.

### Members

| Member | Description |
|---|---|
| Superscript | Text is moved above the baseline. |
| Subscript | Text is moved below the baseline. |
| SuperscriptUpperEdge | Text is scaled und moved above the baseline. The moved text does not extend above the upper edge of capital letters. This can be used for nominators of diagonal fractions. |
| SubscriptBaseline | Text is scaled, but is not moved below the baseline. This can be used for denominators of diagonal fractions. |
| None | Text is scaled, but is not moved below the baseline. This can be used for denominators of diagonal fractions. |

### Examples

The following example uses `TXTextControl.AutoBaseline.Superscript` (text is moved above the baseline.) in a document-editing workflow.

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

function applyAutoBaseline(formattingStyle) {
    formattingStyle.setAutoBaseline(
        TXTextControl.AutoBaseline.Superscript,
        function() {
            console.log("set auto baseline completed.");
        },
        onTxError
    );
}
```

---

## Nearby

- **Previous:** [Javascript: TXTextControl.atobUTF8 Method](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/atobutf8-method/llms-full.txt)
- **Next:** [Javascript: TXTextControl.AutoGenerationType Enumeration](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/autogenerationtype-enumeration/llms-full.txt)
