Javascript: TXTextControl.FindOptions Enumeration
Description
Determines search options for the find method.
Members
| Member | Description |
|---|---|
| Reverse | The search starts at the end of the control's document and searches to the beginning of the document. |
| MatchCase | Locates only instances of the search text that have the exact casing. |
| NoHighlight | The search text, if found, is not highlighted. |
| NoMessageBox | Does not display message boxes to inform about search results. |
| MatchWholeWord | Locates 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);