Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a button on format ribbon

Type parameters

  • T: string

Hierarchy

  • RibbonButton

Index

Properties

Optional commandBarProperties

commandBarProperties: Partial<ICommandBarItemProps>

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

Do not use ICommandBarItemProps.subMenuProps here since it will be overwritten. If need, specify its value using RibbonButton.dropDownMenu.commandBarSubMenuProperties.

Optional dropDownMenu

dropDownMenu: RibbonButtonDropDown

A drop down menu of this button. When set this value, the button will has a "v" icon to let user know it will open a drop down menu. And the onClick handler will only be triggered when user click a menu item of the drop down.

Optional flipWhenRtl

flipWhenRtl: boolean

True if we need to flip the icon when render in Right-to-left page

iconName

iconName: string

Optional isChecked

isChecked: (formatState: ContentModelFormatState) => boolean

Type declaration

    • Get if the current button should be checked

      Parameters

      Returns boolean

      True to show the button in a checked state, otherwise false

Optional isDisabled

isDisabled: (formatState: ContentModelFormatState) => boolean

Type declaration

    • Get if the current button should be disabled

      Parameters

      Returns boolean

      True to show the button in a disabled state, otherwise false

key

key: T

key of this button, needs to be unique

onClick

onClick: (editor: IEditor, key: T, strings: LocalizedStrings<T, string>, uiUtilities: UIUtilities) => void

Type declaration

    • Click handler of this button.

      Parameters

      • editor: IEditor

        the editor instance

      • key: T

        key of the button that is clicked

      • strings: LocalizedStrings<T, string>

        localized strings used by any UI element of this click handler

      • uiUtilities: UIUtilities

        a utilities object to help render addition UI elements

      Returns void

unlocalizedText

unlocalizedText: string

Text of the button. This text is not localized. To show a localized text, pass a dictionary to Ribbon component via RibbonProps.strings.

Generated using TypeDoc