Nutrient Web SDK

ReferenceInlineTextSelectionToolbarItemsCallback

Type Alias InlineTextSelectionToolbarItemsCallback

This callback can be run on specific text selection to modify its inline toolbar items. Nutrient Web SDK comes with a built-in toolbar that shows whenever some text is selected on a document, we will refer to said tooltip as inline toolbar from now on. This callback allows users to customize said inline toolbar.

Type Alias
Type Signature
type InlineTextSelectionToolbarItemsCallback = (
    options: {
        defaultItems: InlineTextSelectionToolbarItem[];
        hasDesktopLayout: boolean;
    },
    selection: TextSelection,
) => InlineTextSelectionToolbarItem[]

Type Declaration

Parameters

options
{ … }

The object that can be helpful in implementing custom toolbar.

  • defaultItems: InlineTextSelectionToolbarItem[]

    The list of default items that are shown for this particular annotation.

  • hasDesktopLayout: boolean

    Whether the screen is in desktop layout.

selectionTextSelection

The reference to the text that is currently selected.

Returns