Class Search.TextSearch
Searches for text in a given node.
Defined in: search.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Search.TextSearch(rootNode, rowFinder)
|
Method Attributes | Method Name and Description |
---|---|
find(text, reverse, caseSensitive)
Find the first result in the node.
|
|
findNext(wrapAround, sameNode, reverse, caseSensitive)
Find the next search result
|
|
reset()
Resets the instance state to the initial state.
|
Class Detail
Search.TextSearch(rootNode, rowFinder)
- Parameters:
- {Node} rootNode
- Node to search
- {function} rowFinder
- Results filter. On find this method will be called with the node containing the matched text as the first parameter. This may be undefined to return the node as is.
Method Detail
find(text, reverse, caseSensitive)
Find the first result in the node.
- Parameters:
- {String} text
- Text to search for
- {boolean} reverse
- True to perform a reverse search
- {boolean} caseSensitive
- True to perform a case sensitive search
findNext(wrapAround, sameNode, reverse, caseSensitive)
Find the next search result
- Parameters:
- {boolean} wrapAround
- True to wrap the search if the end of range is reached
- {boolean} sameNode
- True to return multiple results from the same text node
- {boolean} reverse
- True to search in reverse
- {boolean} caseSensitive
- True to perform a case sensitive search
reset()
Resets the instance state to the initial state.