Options
All
  • Public
  • Public/Protected
  • All
Menu

Represent a drop down menu of a ribbon button

Hierarchy

  • RibbonButtonDropDown

Index

Properties

Optional allowLivePreview

allowLivePreview: boolean

Whether live preview feature is enabled for this plugin. When live preview is enabled, hovering on a sub item will show the format result immediately in editor. This option needs dropDownItems to have values

Optional commandBarSubMenuProperties

commandBarSubMenuProperties: Partial<IContextualMenuProps>

Use this property to pass in Fluent UI ContextMenu property directly. It will overwrite the values of other conflict properties

Optional getSelectedItemKey

getSelectedItemKey: (formatState: ContentModelFormatState) => string

Type declaration

    • Get the key of current selected item

      Parameters

      Returns string

      the key of selected item, it needs to be the same with the key in dropDownItems

Optional itemClassName

itemClassName: string

CSS class name for drop down menu item

Optional itemRender

itemRender: (item: IContextualMenuItem, onClick: (e: MouseEvent<Element, MouseEvent> | KeyboardEvent<Element>, item: IContextualMenuItem) => void) => ReactNode

Type declaration

    • (item: IContextualMenuItem, onClick: (e: MouseEvent<Element, MouseEvent> | KeyboardEvent<Element>, item: IContextualMenuItem) => void): ReactNode
    • Custom render of drop down item

      Parameters

      • item: IContextualMenuItem

        This menu item

      • onClick: (e: MouseEvent<Element, MouseEvent> | KeyboardEvent<Element>, item: IContextualMenuItem) => void

        click handler of this menu item

          • (e: MouseEvent<Element, MouseEvent> | KeyboardEvent<Element>, item: IContextualMenuItem): void
          • Parameters

            • e: MouseEvent<Element, MouseEvent> | KeyboardEvent<Element>
            • item: IContextualMenuItem

            Returns void

      Returns ReactNode

items

items: Record<string, string>

A key-value map for child items. When click on a child item, onClick handler will be triggered with the key of the clicked child item passed in as the second parameter

Generated using TypeDoc