Customizing existing tools in our inline text selection toolbar

Customize the following properties of built-in items:

  • className
  • icon
  • id
  • onPress
  • title

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

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