react-pdf-highlighter-plus

The props type for ImageHighlight.

interface ImageHighlightProps {
    bounds?: string | Element;
    deleteIcon?: ReactNode;
    dragIcon?: ReactNode;
    highlight: ViewportHighlight;
    isScrolledTo?: boolean;
    style?: CSSProperties;
    onChange?(rect): void;
    onContextMenu?(event): void;
    onDelete?(): void;
    onEditEnd?(): void;
    onEditStart?(): void;
}

Properties

bounds?: string | Element

react-rnd bounds on the highlight area.

deleteIcon?: ReactNode

Custom delete icon. Replaces the default trash icon.

dragIcon?: ReactNode

Custom drag icon. Replaces the default 6-dot grid icon.

The highlight to be rendered as an ImageHighlight. The highlight.content.image should contain the image data URL.

isScrolledTo?: boolean

Has the highlight been auto-scrolled into view?

style?: CSSProperties

Custom styling for the container.

Methods