Constructor
new SearchManager()
Example
let embedView; // View实例
let searchManager = embedView.getSearchManager('searchPattern', flags, startPageIndex, endPageIndex);
Methods
destroy()
- Description:
- 销毁SearchManager实例,释放资源。
(async) findNext() → {Promise.<SearchManager.TextSearchMatch>}
- Description:
- 查找下一个匹配项。
Returns:
- Type
- Promise.<SearchManager.TextSearchMatch>
(async) findPrev() → {Promise.<SearchManager.TextSearchMatch>}
- Description:
- 查找上一个匹配项。
Returns:
- Type
- Promise.<SearchManager.TextSearchMatch>
Type Definitions
TextSearchMatch
Properties:
| Name | Type | Description |
|---|---|---|
getEndCharIndex |
function | 获取当前匹配模式的最后一个字符的索引,基于当前匹配页面。 |
getPageIndex |
function | 获取当前匹配所属的页面索引。 |
getRects |
function | 获取当前匹配模式的矩形区域。 |
getSentence |
function | 获取包含当前匹配模式的句子。 |
getSentenceStartIndex |
function | 获取当前匹配模式的第一个字符的索引,基于匹配句子。 |
getStartCharIndex |
function | 获取当前匹配模式的第一个字符的索引,基于当前匹配页面。 |
Type:
- Object