InsertReviewAnnotationDropButton

Type: React component

How to get InsertReviewAnnotationDropButton?

JavaScript

import InsertReviewAnnotationDropButton from 'fontoxml-feedback/src/InsertReviewAnnotationDropButton.jsx'

This is the exact same component that is rendered in the "comments" sidebar header from the "fontoxml-feedback" add-on.

This renders a DropButton that includes a menu with a menu item for each registered review annotation type which inserts an annotation of the corresponding type when clicked.

The order of the menu items is determined by the priority of the registered review annotation type. Higher priority, means higher in the menu.

Note: this component is only intended to be used on the /editor route. It will not work when used on the /review route. So take care when using this inside a custom sheet frame header component to not output it when the sheet frame header's productContext !== 'editor'. On the /review route there is a special popover active that shows up whenever you make a selection inside the previewed content. It shows a row of buttons, one for each registered review annotation, similar to this component's menu items.

Props

  1. isDisabled

    (Optional)

    Type: Boolean

    Whether or not the drop button itself should be disabled (which prevents it from opening). The drop button is automatically disabled if a review annotation cannot be inserted at the current cursor position or for the current selection. If you explicitly set a value for this prop, that value is always used regardless of the underlying operation state. The menu items in the drop are still disabled if the underlying operation state indicates it should.

    Default value

  2. allowedTargetTypes

    (Optional)

    Type: Array

    Do not use directly. Only to be used by the Fonto platform.

    Default value