# Javascript: TXTextControl.ImageInsertionMode Enumeration

> Determines how an image can be inserted in the text.

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

---

### Description

Determines how an image can be inserted in the text.

### Members

| Member | Description |
|---|---|
| AboveTheText | The image is inserted at a certain geometrical location above the text. This means that the image overwrites the text. |
| AsCharacter | The image is inserted in the text as a single character. |
| BelowTheText | The image is inserted at a certain geometrical location below the text. This means that the text overwrites the image. |
| DisplaceCompleteLines | The image is inserted at a certain geometrical location. |
| DisplaceText | The image is inserted at a certain geometrical location. |

### Examples

The following example uses `TXTextControl.ImageInsertionMode.AsCharacter` (the image is inserted in the text as a single character.) in a document-editing workflow.

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

TXTextControl.images.addAtFixedPosition(
    "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAFgAH/qbPzWQAAAABJRU5ErkJggg==",
    1,
    { x: 1440, y: 720 },
    TXTextControl.ImageInsertionMode.AsCharacter,
    onTxError
);
```

---

## Nearby

- **Previous:** [Javascript: TXTextControl.ImageFormat Enumeration](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/imageformat-enumeration/llms-full.txt)
- **Next:** [Javascript: TXTextControl.images Property](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/images-property/llms-full.txt)
