react-pdf-highlighter-extended

This represents a selected (text/mouse) area that has been turned into a highlight. If you are storing highlights, they should be stored as this type.

interface Highlight {
    content?: Content;
    id: string;
    position: ScaledPosition;
    type?: HighlightType;
}

Properties

content?: Content

Deprecated

If you want your highlight to store content after being a GhostHighlight, you should create your own interface extended off this. If you are currently using this property to determine what kind of highlight to render, please use type.

id: string
position: ScaledPosition

This property is planned to be non-optional in future.