---
title: "Rearrange text selection tools in JavaScript PDF viewer | Nutrient"
canonical_url: "https://www.nutrient.io/guides/web/user-interface/inline-text-selection-toolbar/rearrange-items/"
md_url: "https://www.nutrient.io/guides/web/user-interface/inline-text-selection-toolbar/rearrange-items.md"
last_updated: "2026-05-15T19:10:05.104Z"
description: "Learn how to rearrange the inline text selection toolbar in Nutrient Web SDK with API examples for loading and modifying toolbar items effectively."
---

# Rearranging inline text selection tools in the viewer toolbar

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:

```js

NutrientViewer.load({
  //...otherOptions
  inlineTextSelectionToolbarItems: ({ defaultItems }) => {
    return defaultItems.reverse();
  }
});

```

The example below changes the toolbar after the PDF has loaded using [`instance.setInlineTextSelectionToolbarItems`](https://www.nutrient.io/api/web/NutrientViewer.Instance.html#setInlineTextSelectionToolbarItems):

```js

instance.setInlineTextSelectionToolbarItems(({ defaultItems }) => {
  return defaultItems.reverse();
});

```
---

## Related pages

- [Create a new inline text selection tool in the viewer toolbar](/guides/web/user-interface/inline-text-selection-toolbar/create-a-new-tool.md)
- [Customizing existing tools in our inline text selection toolbar](/guides/web/user-interface/inline-text-selection-toolbar/customize-existing-tools.md)
- [Remove inline text selection tools](/guides/web/user-interface/inline-text-selection-toolbar/remove-a-tool.md)
- [Customize the text selection tooltip in our viewer](/guides/web/user-interface/inline-text-selection-toolbar/tooltip.md)
- [Remove all tools from the inline text selection toolbar](/guides/web/user-interface/inline-text-selection-toolbar/remove-all-tools.md)

