# Javascript: TextFrame.getInsertionMode Method

> Gets a value determining whether the frame is treated as a single character or the document's text either flows around or overwrites the frame. If the document's text flows around or overwrites the frame, this property also determines whether the image, text frame, chart, barcode or drawing is moved with the text or fixed positioned on a page.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 28.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: TextFrame.getInsertionMode Method
- **499 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/textframe/getinsertionmode-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/textframe/getinsertionmode-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/textframe/getinsertionmode-method/llms-full.txt

---

### Description

Gets a value determining whether the frame is treated as a single character or the document's text either flows around or overwrites the frame. If the document's text flows around or overwrites the frame, this property also determines whether the image, text frame, chart, barcode or drawing is moved with the text or fixed positioned on a page.

### Syntax

```javascript
<void> TextFrame.getInsertionMode(<RequestFrameInsertionModeCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Receives the current property value. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `TextFrame.getInsertionMode` in a practical document-editing workflow. It gets a value determining whether the frame is treated as a single character or the document's text either flows around or overwrites the frame. If the document's text flows around or overwrites the frame, this property also determines whether the image, text frame, chart, barcode or drawing is moved with the text or fixed positioned on a page.

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

function inspectInsertionMode(textFrame) {
    textFrame.getInsertionMode(
        function(insertionMode) {
            if (!insertionMode) {
                console.warn("No frame insertion mode was returned.");
                return;
            }
            
            console.log("get insertion mode result:", insertionMode);
        },
        onTxError
    );
}
```

---

## Nearby

- **Previous:** [Javascript: TextFrame.getID Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/textframe/getid-method/llms-full.txt)
- **Next:** [Javascript: TextFrame.getInternalMargins Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/textframe/getinternalmargins-method/llms-full.txt)
