TX Text Control .NET Server

Javascript: TXTextControl.FindOptions Enumeration

Enumeration|Introduced in 28.0

Description

Determines search options for the find method.

Members

MemberDescription
ReverseThe search starts at the end of the control's document and searches to the beginning of the document.
MatchCaseLocates only instances of the search text that have the exact casing.
NoHighlightThe search text, if found, is not highlighted.
NoMessageBoxDoes not display message boxes to inform about search results.
MatchWholeWordLocates only instances of the search text which are whole words.

Examples

The following example uses TXTextControl.FindOptions.Reverse (the search starts at the end of the control's document and searches to the beginning of the document.) in a document-editing workflow.

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

TXTextControl.textParts.getMainText(function(formattedText) {
    formattedText.find(
        "Quarterly report",
        1,
        TXTextControl.FindOptions.Reverse,
        function(result) {
            console.log("find result:", result);
        },
        onTxError
    );
}, onTxError);