DS Server

Javascript: TXTextControl.FrameInsertionMode Enumeration

Enumeration|Introduced in 28.0

Description

Determines how the frame of an image, text frame, chart, barcode or drawing can be inserted in the text.

Members

MemberDescription
AboveTheTextThe frame is inserted at a certain geometrical location above the text. This means that the frame overwrites the text.
AsCharacterThe frame is inserted in the text as a single character.
BelowTheTextThe frame is inserted at a certain geometrical location below the text. This means that the text overwrites the frame.
DisplaceCompleteLinesThe frame is inserted at a certain geometrical location.
DisplaceTextThe frame is inserted at a certain geometrical location.

Examples

The following example uses TXTextControl.FrameInsertionMode.AsCharacter (the frame 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;
}

function applyFrameInsertionMode(frameBase) {
    frameBase.setInsertionMode(
        TXTextControl.FrameInsertionMode.AsCharacter,
        function() {
            console.log("set insertion mode completed.");
        },
        onTxError
    );
}