Builds the localized Copy / Select All / text-markup / Add link context menu
that @pdfrx/react installs on the viewer by default (via
PdfrxViewerOptions.contextMenuBuilder).
It is plain DOM, not React — the viewer wants an HTMLElement and owns the
menu's placement and dismissal. The labels come from the active
PdfrxStrings; the look is themeable through the pdfrx-context-menu
classes in styles.css.
Apps that want different items can pass their own contextMenuBuilder prop
instead (it wins over this default). Apps that keep markup outside the PDF
can reuse this menu with DefaultContextMenuOptions.
Builds the localized Copy / Select All / text-markup / Add link context menu that
@pdfrx/reactinstalls on the viewer by default (via PdfrxViewerOptions.contextMenuBuilder).It is plain DOM, not React — the viewer wants an
HTMLElementand owns the menu's placement and dismissal. The labels come from the active PdfrxStrings; the look is themeable through thepdfrx-context-menuclasses instyles.css.Markup opens a subtype-by-color matrix. Hovering or focusing a cell previews it without mutating the PDF, and clicking commits it. Highlight uses TEXT_HIGHLIGHT_COLORS and TEXT_HIGHLIGHT_OPACITY; line subtypes use TEXT_MARKUP_LINE_COLORS at full opacity.
Apps that want different items can pass their own
contextMenuBuilderprop instead (it wins over this default). Apps that keep markup outside the PDF can reuse this menu with DefaultContextMenuOptions.