# Javascript: TXTextControl.IfField.preserveFormatting Property

> Specifies whether the field's formatting should be preserved.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 25.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: TXTextControl.IfField.preserveFormatting Property
- **175 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol-iffield/preserveformatting-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol-iffield/preserveformatting-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol-iffield/preserveformatting-property/llms-full.txt

---

### Description

Specifies whether the field's formatting should be preserved.

### Syntax

```javascript
<boolean> TXTextControl.IfField.preserveFormatting
```

### Examples

The following example demonstrates `TXTextControl.IfField.preserveFormatting` in a practical document-editing workflow. It specifies whether the field's formatting should be preserved.

```javascript
function inspectPreserveFormatting(ifField) {
    const preserveFormatting = ifField.preserveFormatting;
    console.log("preserve formatting:", preserveFormatting);
}
```

---

## Nearby

- **Previous:** [Javascript: TXTextControl.IfField.operator Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol-iffield/operator-property/llms-full.txt)
- **Next:** [Javascript: TXTextControl.IfField.text Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol-iffield/text-property/llms-full.txt)
