pdfrx_web
    Preparing search index...

    Function buildDefaultContextMenu

    • 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.

      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 contextMenuBuilder prop instead (it wins over this default).

      Parameters

      Returns HTMLElement

      The resulting HTMLElement.