This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/web/user-interface/inline-text-selection-toolbar/rearrange-items.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Rearrange text selection tools in JavaScript PDF viewer | Nutrient

Nutrient Web SDK 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:

NutrientViewer.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();
});