text
object is an instance accessible from the main mupdfwv.MuPDFWebViewer instance as follows:
mupdf
from the initMuPDFWebViewer() promise!text
object has the following methods:
search(config: { keyword: string; caseSensitive?: boolean; useRegex?: boolean; pageRange?: string })
Searches for text.
Promise<{ results: { words: { prefix: string; keyword: string; suffix: string; redMarked: boolean; rects: mupdfwv.TRect[]; }[]; pageIndex: number; }[]; }
.getSelected()
Gets the currently selected text from a document.
If there is no selected text then returns null
.
Promise<{ text: string, rect:{} }>
.