# Javascript: TXTextControl.TableAddPosition Enumeration

> Specifies the position where to split the table.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Enumeration
- **Introduced:** 28.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: TXTextControl.TableAddPosition Enumeration
- **441 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/tableaddposition-enumeration/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/tableaddposition-enumeration/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/tableaddposition-enumeration/llms-full.txt

---

### Description

Specifies the position where to split the table.

### Members

| Member | Description |
|---|---|
| Before | The table is split in front of the row with the current input position. |
| After | The table is split behind the row with the current input position. |

### Examples

The following example uses `TXTextControl.TableAddPosition.After` (the table is split behind the row with the current input position.) in a document-editing workflow.

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

TXTextControl.textParts.getMainText(function(mainText) {
    const tables = mainText.tables;
    tables.getItem(function(table) {
        if (!table) {
            console.warn("No table is available at the current input position.");
            return;
        }
    
        table.split(
            TXTextControl.TableAddPosition.After,
            function(result) {
                if (result) {
                    console.log("split is available.");
                } else {
                    console.warn("split is not available in the current document state.");
                }
            },
            onTxError
        );
    }, onTxError);
}, onTxError);
```

---

## Nearby

- **Previous:** [Javascript: TXTextControl.StreamType Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/streamtype-enumeration/llms-full.txt)
- **Next:** [Javascript: TXTextControl.TabLeader Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/tableader-enumeration/llms-full.txt)
