TX Text Control .NET Server

Javascript: DocumentViewerController.find Method

Method|Introduced in 24.0

Description

Searches the current document, ignoring case unless requested otherwise.

Syntax

<void> DocumentViewerController.find(<string> text, [<Object> options])

Parameters

ParameterDescription
text

Text to find; an empty string clears the search.

options

Optional. Set `matchCase` to `true` to match letter case; defaults to `false`.

Return Value

This method does not return a value.

Examples

The following example demonstrates TXDocumentViewer.find in a practical Document Viewer workflow. Finds a string in the currently loaded document.

TXDocumentViewer.find("payment terms");
console.log("Searching the current document for payment terms.");