Remove All Tools in the Viewer Toolbar

PSPDFKit for Web comes with a customizable inline text selection toolbar that, by default, includes some predefined items. You can remove all the toolbar items using the Configuration object:

PSPDFKit.load({
  // ...other options
  inlineTextSelectionToolbarItems: (
    { defaultItems, hasDesktopLayout },
    selection
  ) => {
    return [];
  }
});

Alternatively, you can use instance.setInlineTextSelectionToolbarItems:

instance.setInlineTextSelectionToolbarItems(
  ({ defaultItems, hasDesktopLayout }, selection) => {
    return [];
  }
);