# Javascript: TextPart.type Property

> Obsolete. This property will be removed in one of the next versions. The Text part type. Possible values are "mainText", "headerFooter" and "textFrame".

> **Note:** This is deprecated and should not be used in new work.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 24.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: TextPart.type Property
- **261 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/textpart/type-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/textpart/type-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/textpart/type-property/llms-full.txt

---

### Description

`Obsolete. This property will be removed in one of the next versions.` The Text part type. Possible values are "mainText", "headerFooter" and "textFrame".

### Syntax

```javascript
<string> TextPart.type
```

### Examples

The following example demonstrates `TextPart.type` in a practical document-editing workflow. Obsolete. This property will be removed in one of the next versions. The Text part type. Possible values are "mainText", "headerFooter" and "textFrame".

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

TXTextControl.textParts.getMainText(function(textPart) {
    const type = textPart.type;
    console.log("type:", type);
}, onTxError);
```

### Limitations

Read Only.

---

## Nearby

- **Previous:** [Javascript: TextPart.selection Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/textpart/selection-property/llms-full.txt)
- **Next:** [TextPartCollection Object](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/textpartcollection/llms-full.txt)
