Javascript: TXTextControl.ImageInsertionMode Enumeration
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.
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
);