---
title: "Customizing text selection toolbar in JavaScript PDF viewer | Nutrient"
canonical_url: "https://www.nutrient.io/guides/web/user-interface/inline-text-selection-toolbar/customize-existing-tools/"
md_url: "https://www.nutrient.io/guides/web/user-interface/inline-text-selection-toolbar/customize-existing-tools.md"
last_updated: "2026-05-14T21:57:26.972Z"
description: "Customizing text selection toolbar in JavaScript PDF viewer | guide for Nutrient Web SDK with detailed instructions and code examples."
---

# Customizing existing tools in our inline text selection toolbar

Customize the following properties of built-in [items](https://www.nutrient.io/api/web/NutrientViewer.ToolItem.html):

- `className`

- `icon`

- `id`

- `onPress`

- `title`

The example below adds a custom `onPress` handler to the first item of the inline text selection toolbar:

```js

NutrientViewer.load({
  //...otherOptions
  inlineTextSelectionToolbarItems: ({ defaultItems }) => {
    defaultItems[0].onPress = () => alert("Custom onPress handler!");
    return defaultItems;
  }
});

```
---

## 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)
- [Rearranging inline text selection tools in the viewer toolbar](/guides/web/user-interface/inline-text-selection-toolbar/rearrange-items.md)
- [Remove all tools from the inline text selection toolbar](/guides/web/user-interface/inline-text-selection-toolbar/remove-all-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)

