Rearranging Inline Text Selection 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 rearrange the toolbar items using the API.
The example below reverses the order of the items in the toolbar when loading a PDF:
PSPDFKit.load({ // ...otherOptions inlineTextSelectionToolbarItems: ({ defaultItems }) => { return defaultItems.reverse(); } });
The example below changes the toolbar after the PDF has loaded using instance.setInlineTextSelectionToolbarItems
:
instance.setInlineTextSelectionToolbarItems(({ defaultItems }) => {
return defaultItems.reverse();
});