Skip to content

@morph-mapper/source


@morph-mapper/source / useTextHighlight

Function: useTextHighlight() ​

useTextHighlight(): object

Defined in: hooks/use-text-highlight.ts:4

Returns ​

getHighlightedContent ​

getHighlightedContent: (content, highlights, pageOffset) => string

Parameters ​

content ​

string

The text content of the current page

highlights ​

Highlight[]

The global highlights (with global head/tail)

pageOffset? ​

number = 0

The global offset of the start of this page in the full text

Returns ​

string