# Javascript: TXTextControl.Justification Enumeration

> Specifies the kind of justification.

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

---

### Description

Specifies the kind of justification.

### Members

| Member | Description |
|---|---|
| Spaces | To justify a line additional space is added to the spaces between the words. |
| Kashida | To justify a line Kashida lines are inserted. |
| SpacesAndKashida | To justify a line both kinds of justification are used. |

### Examples

The following example uses `TXTextControl.Justification.Spaces` (to justify a line additional space is added to the spaces between the words.) in a document-editing workflow.

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

TXTextControl.paragraphFormat.setJustification(
    TXTextControl.Justification.Spaces,
    function() {
        console.log("set justification completed.");
    },
    onTxError
);
```

---

## Nearby

- **Previous:** [Javascript: TXTextControl.isTrackChangesEnabled Property](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/istrackchangesenabled-property/llms-full.txt)
- **Next:** [Javascript: TXTextControl.listFormat Property](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/listformat-property/llms-full.txt)
