Options
All
  • Public
  • Public/Protected
  • All
Menu

Module roosterjs-react

Index

Interfaces

Type aliases

Variables

Functions

Type aliases

AlignCenterButtonStringKey

AlignCenterButtonStringKey: "buttonNameAlignCenter"

Key of localized strings of Align center button

AlignJustifyButtonStringKey

AlignJustifyButtonStringKey: "buttonNameAlignJustify"

Key of localized strings of Align justify button

AlignLeftButtonStringKey

AlignLeftButtonStringKey: "buttonNameAlignLeft"

Key of localized strings of Align left button

AlignRightButtonStringKey

AlignRightButtonStringKey: "buttonNameAlignRight"

Key of localized strings of Align right button

AllButtonStringKeys

A public type for localized string keys of all buttons

BackgroundColorButtonStringKey

BackgroundColorButtonStringKey: "buttonNameBackgroundColor" | BackgroundColorKeys

Key of localized strings of Background color button

BackgroundColorKeys

BackgroundColorKeys: "backgroundColorCyan" | "backgroundColorGreen" | "backgroundColorYellow" | "backgroundColorOrange" | "backgroundColorRed" | "backgroundColorMagenta" | "backgroundColorLightCyan" | "backgroundColorLightGreen" | "backgroundColorLightYellow" | "backgroundColorLightOrange" | "backgroundColorLightRed" | "backgroundColorLightMagenta" | "backgroundColorWhite" | "backgroundColorLightGray" | "backgroundColorGray" | "backgroundColorDarkGray" | "backgroundColorDarkerGray" | "backgroundColorBlack"

Localized string keys for background colors

BoldButtonStringKey

BoldButtonStringKey: "buttonNameBold"

Key of localized strings of Bold button

BulletedListButtonStringKey

BulletedListButtonStringKey: "buttonNameBulletedList"

Key of localized strings of Bulleted list button

CancelButtonStringKey

CancelButtonStringKey: "buttonNameCancel"

Localized string key for Cancel button

CellShadeButtonStringKey

CellShadeButtonStringKey: "buttonNameCellShade" | BackgroundColorKeys
deprecated

Key of localized strings of Cell shade button

ClearFormatButtonStringKey

ClearFormatButtonStringKey: "buttonNameClearFormat"

Key of localized strings of Clear format button

CodeButtonStringKey

CodeButtonStringKey: "buttonNameCode"

Key of localized strings of Code button

DecreaseFontSizeButtonStringKey

DecreaseFontSizeButtonStringKey: "buttonNameDecreaseFontSize"

Key of localized strings of Decrease font size button

DecreaseIndentButtonStringKey

DecreaseIndentButtonStringKey: "buttonNameDecreaseIndent"

Key of localized strings of Decrease indent size button

EmojiStringKeys

EmojiStringKeys: "emojiSearchPlaceholder" | "emojiSearchInputAriaLabel"

Localized string keys for Emoji UI component

FontButtonStringKey

FontButtonStringKey: "buttonNameFont"

Key of localized strings of Font button

FontSizeButtonStringKey

FontSizeButtonStringKey: "buttonNameFontSize"

Key of localized strings of Font size button

HeaderButtonStringKey

HeaderButtonStringKey: "buttonNameHeader" | "buttonNameHeader1" | "buttonNameHeader2" | "buttonNameHeader3" | "buttonNameHeader4" | "buttonNameHeader5" | "buttonNameHeader6" | "buttonNameNoHeader" | HeadingButtonStringKey
deprecated

Use HeadingButtonStringKey instead

HeadingButtonStringKey

HeadingButtonStringKey: "buttonNameHeading" | "buttonNameHeading1" | "buttonNameHeading2" | "buttonNameHeading3" | "buttonNameHeading4" | "buttonNameHeading5" | "buttonNameHeading6" | "buttonNameNoHeading" | MenuItemSplitterKey0

Key of localized strings of Heading button

ImageEditMenuItemStringKey

ImageEditMenuItemStringKey: "menuNameImageAltText" | "menuNameImageResize" | "menuNameImageCrop" | "menuNameImageRotate" | "menuNameImageRemove" | "menuNameImageFlip" | "menuNameImageSizeBestFit" | "menuNameImageSizeSmall" | "menuNameImageSizeMedium" | "menuNameImageSizeOriginal" | "menuNameImageRotateLeft" | "menuNameImageRotateRight" | "menuNameImageRotateFlipHorizontally" | "menuNameImageRotateFlipVertically" | "menuNameImageCopy" | "menuNameImageCut" | OkButtonStringKey | CancelButtonStringKey

Key of localized strings of Image Alt Text menu item. Including:

  • Menu item "Add alternate text"
  • Menu item "Size" and sub menus"
  • Menu item "Crop image"
  • Menu item "Remove image"
  • Ok button
  • Cancel button

IncreaseFontSizeButtonStringKey

IncreaseFontSizeButtonStringKey: "buttonNameIncreaseFontSize"

Key of localized strings of Increase font size button

IncreaseIndentButtonStringKey

IncreaseIndentButtonStringKey: "buttonNameIncreaseIndent"

Key of localized strings of Increase indent size button

InsertImageButtonStringKey

InsertImageButtonStringKey: "buttonNameInsertImage"

Key of localized strings of Insert image button

InsertLinkButtonStringKey

InsertLinkButtonStringKey: "buttonNameInsertLink" | "insertLinkTitle" | "insertLinkDialogUrl" | "insertLinkDialogDisplayAs" | OkButtonStringKey | CancelButtonStringKey

Key of localized strings of Insert link button

InsertTableButtonStringKey

InsertTableButtonStringKey: "buttonNameInsertTable" | "insertTablePane"

Key of localized strings of Insert table button

ItalicButtonStringKey

ItalicButtonStringKey: "buttonNameItalic"

Key of localized strings of Italic button

ListNumberMenuItemStringKey

ListNumberMenuItemStringKey: "menuNameListNumberEdit" | "menuNameListNumberReset" | "dialogTextSetListNumber" | OkButtonStringKey | CancelButtonStringKey

Key of localized strings of List Number menu items and its dialog. Including:

  • Menu item "Set numbering value"
  • Menu item "Restart at 1"
  • Dialog text "Set value to"
  • Ok button
  • Cancel button

LocalizedStrings

LocalizedStrings<T, V>: {[ key in T]: V | (() => V) }

Represents a localized string map from the string key to the localized string or a function returns localized string

Type parameters

  • T: string

  • V: string = string

LtrButtonStringKey

LtrButtonStringKey: "buttonNameLtr"

Key of localized strings of Left to right button

MenuItemSplitterKey0

MenuItemSplitterKey0: "-"

Localized string key for Cancel button menu splitter. No need to localize this one as it will be replaced with a horizontal line

MoreCommandsButtonStringKey

MoreCommandsButtonStringKey: "buttonNameMoreCommands"

Key of localized strings of More commands (overflow) button

NumberedListButtonStringKey

NumberedListButtonStringKey: "buttonNameNumberedList"

Key of localized strings of Numbered list button

OkButtonStringKey

OkButtonStringKey: "buttonNameOK"

Localized string key for OK button

PasteOptionButtonKeys

PasteOptionButtonKeys: "pasteOptionPasteAsIs" | "pasteOptionPasteText" | "pasteOptionMergeFormat" | "pasteOptionPasteAsImage"

keys for Paste Option buttons

PasteOptionStringKeys

PasteOptionStringKeys: PasteOptionButtonKeys | "pasteOptionPaneText"

Localized string keys for Paste Option buttons and its UI component

QuoteButtonStringKey

QuoteButtonStringKey: "buttonNameQuote"

Key of localized strings of Quote button

RedoButtonStringKey

RedoButtonStringKey: "buttonNameRedo"

Key of localized strings of Redo button

RemoveLinkButtonStringKey

RemoveLinkButtonStringKey: "buttonNameRemoveLink"

Key of localized strings of Remove link button

RtlButtonStringKey

RtlButtonStringKey: "buttonNameRtl"

Key of localized strings of Right to left button

StrikethroughButtonStringKey

StrikethroughButtonStringKey: "buttonNameStrikethrough"

Key of localized strings of Strikethrough button

SubscriptButtonStringKey

SubscriptButtonStringKey: "buttonNameSubscript"

Key of localized strings of Subscript button

SuperscriptButtonStringKey

SuperscriptButtonStringKey: "buttonNameSuperscript"

Key of localized strings of Superscript button

TableEditAlignMenuItemStringKey

TableEditAlignMenuItemStringKey: "menuNameTableAlign" | "menuNameTableAlignLeft" | "menuNameTableAlignCenter" | "menuNameTableAlignRight" | "menuNameTableAlignTop" | "menuNameTableAlignMiddle" | "menuNameTableAlignBottom" | MenuItemSplitterKey0

Key of localized strings of Table Edit Align menu item.

TableEditAlignTableMenuItemStringKey

TableEditAlignTableMenuItemStringKey: "menuNameTableAlignTable" | "menuNameTableAlignTableLeft" | "menuNameTableAlignTableCenter" | "menuNameTableAlignTableRight"

Key of localized strings of Table Edit Align table menu item.

TableEditDeleteMenuItemStringKey

TableEditDeleteMenuItemStringKey: "menuNameTableDelete" | "menuNameTableDeleteTable" | "menuNameTableDeleteColumn" | "menuNameTableDeleteRow"

Key of localized strings of Table Edit Delete menu item.

TableEditInsertMenuItemStringKey

TableEditInsertMenuItemStringKey: "menuNameTableInsert" | "menuNameTableInsertAbove" | "menuNameTableInsertBelow" | "menuNameTableInsertLeft" | "menuNameTableInsertRight"

Key of localized strings of Table Edit Insert menu item.

TableEditMenuItemStringKey

Key of localized strings of Table Edit menu item. Including:

  • Menu item "Insert"
  • Menu item "Delete"
  • Menu item "Merge"
  • Menu item "Split"
  • Menu item "Align cell"

TableEditMergeMenuItemStringKey

TableEditMergeMenuItemStringKey: "menuNameTableMerge" | "menuNameTableMergeAbove" | "menuNameTableMergeBelow" | "menuNameTableMergeLeft" | "menuNameTableMergeRight" | "menuNameTableMergeCells" | MenuItemSplitterKey0

Key of localized strings of Table Edit Merge menu item.

TableEditShadeMenuItemStringKey

TableEditShadeMenuItemStringKey: "menuNameTableCellShade" | BackgroundColorKeys

Key of localized strings of Table Edit Cell Shade menu item.

TableEditSplitMenuItemStringKey

TableEditSplitMenuItemStringKey: "menuNameTableSplit" | "menuNameTableSplitHorizontally" | "menuNameTableSplitVertically"

Key of localized strings of Table Edit Split menu item.

TextColorButtonStringKey

TextColorButtonStringKey: "buttonNameTextColor" | TextColorKeys

Key of localized strings of Text color button

TextColorKeys

TextColorKeys: "textColorLightBlue" | "textColorLightGreen" | "textColorLightYellow" | "textColorLightOrange" | "textColorLightRed" | "textColorLightPurple" | "textColorBlue" | "textColorGreen" | "textColorYellow" | "textColorOrange" | "textColorRed" | "textColorPurple" | "textColorDarkBlue" | "textColorDarkGreen" | "textColorDarkYellow" | "textColorDarkOrange" | "textColorDarkRed" | "textColorDarkPurple" | "textColorDarkerBlue" | "textColorDarkerGreen" | "textColorDarkerYellow" | "textColorDarkerOrange" | "textColorDarkerRed" | "textColorDarkerPurple" | "textColorWhite" | "textColorLightGray" | "textColorGray" | "textColorDarkGray" | "textColorDarkerGray" | "textColorBlack"

Localized string keys for text colors

UnderlineButtonStringKey

UnderlineButtonStringKey: "buttonNameUnderline"

Key of localized strings of Underline button

UndoButtonStringKey

UndoButtonStringKey: "buttonNameUndo"

Key of localized strings of Undo button

Variables

Const alignCenterButton

alignCenterButton: RibbonButton<AlignCenterButtonStringKey> = ...

"Align center" button on the format ribbon

Const alignJustifyButton

alignJustifyButton: RibbonButton<"buttonNameAlignJustify"> = ...

"Align justify" button on the format ribbon

Const alignLeftButton

alignLeftButton: RibbonButton<AlignLeftButtonStringKey> = ...

"Align left" button on the format ribbon

Const alignRightButton

alignRightButton: RibbonButton<AlignRightButtonStringKey> = ...

"Align right" button on the format ribbon

Const backgroundColorButton

backgroundColorButton: RibbonButton<BackgroundColorButtonStringKey> = ...

"Background color" button on the format ribbon

Const blockQuoteButton

blockQuoteButton: RibbonButton<QuoteButtonStringKey> = ...

"Block quote" button on the format ribbon

Const boldButton

"Bold" button on the format ribbon

Const bulletedListButton

bulletedListButton: RibbonButton<BulletedListButtonStringKey> = ...

"Bulleted list" button on the format ribbon

Const clearFormatButton

clearFormatButton: RibbonButton<ClearFormatButtonStringKey> = ...

"Clear format" button on the format ribbon

Const codeButton

"Code" button on the format ribbon

Const decreaseFontSizeButton

decreaseFontSizeButton: RibbonButton<DecreaseFontSizeButtonStringKey> = ...

"Decrease font size" button on the format ribbon

Const decreaseIndentButton

decreaseIndentButton: RibbonButton<DecreaseIndentButtonStringKey> = ...

"Decrease indent" button on the format ribbon

Const fontButton

"Font" button on the format ribbon

Const fontSizeButton

fontSizeButton: RibbonButton<FontSizeButtonStringKey> = ...

"Font Size" button on the format ribbon

Const increaseFontSizeButton

increaseFontSizeButton: RibbonButton<IncreaseFontSizeButtonStringKey> = ...

"Increase font size" button on the format ribbon

Const increaseIndentButton

increaseIndentButton: RibbonButton<IncreaseIndentButtonStringKey> = ...

"Increase indent" button on the format ribbon

Const insertImageButton

insertImageButton: RibbonButton<InsertImageButtonStringKey> = ...

"Insert image" button on the format ribbon

Const insertLinkButton

insertLinkButton: RibbonButton<InsertLinkButtonStringKey> = ...

"Insert link" button on the format ribbon

Const insertTableButton

insertTableButton: RibbonButton<InsertTableButtonStringKey> = ...

"Insert table" button on the format ribbon

Const italicButton

italicButton: RibbonButton<ItalicButtonStringKey> = ...

"Italic" button on the format ribbon

Const ltrButton

"Left to right" button on the format ribbon

Const numberedListButton

numberedListButton: RibbonButton<NumberedListButtonStringKey> = ...

"Numbering list" button on the format ribbon

Const redoButton

"Undo" button on the format ribbon

Const removeLinkButton

removeLinkButton: RibbonButton<RemoveLinkButtonStringKey> = ...

"Remove link" button on the format ribbon

Const rtlButton

"Right to left" button on the format ribbon

Const setHeadingLevelButton

setHeadingLevelButton: RibbonButton<HeadingButtonStringKey> = ...

"Set header level" button on the format ribbon

Const strikethroughButton

strikethroughButton: RibbonButton<StrikethroughButtonStringKey> = ...

"Strikethrough" button on the format ribbon

Const subscriptButton

subscriptButton: RibbonButton<SubscriptButtonStringKey> = ...

"Subscript" button on the format ribbon

Const superscriptButton

superscriptButton: RibbonButton<SuperscriptButtonStringKey> = ...

"Superscript" button on the format ribbon

Const textColorButton

textColorButton: RibbonButton<TextColorButtonStringKey> = ...

"Text color" button on the format ribbon

Const underlineButton

underlineButton: RibbonButton<UnderlineButtonStringKey> = ...

"Underline" button on the format ribbon

Const undoButton

"Undo" button on the format ribbon

Functions

Ribbon

Rooster

createContextMenuPlugin

createContextMenuProvider

  • Create a new instance of ContextMenuProviderImpl class

    Type parameters

    • TString: string

    • TContext

    Parameters

    • menuName: string

      Name of this group of menus

    • items: ContextMenuItem<TString, TContext>[]

      Menu items that will be show

    • Optional strings: LocalizedStrings<TString>

      Localized strings of these menu items

    • Optional shouldAddMenuItems: (editor: IEditor, node: Node) => boolean

      A general checker to decide if we should add this group of menu items

        • (editor: IEditor, node: Node): boolean
        • Parameters

          Returns boolean

    • Optional context: TContext

    Returns EditorPlugin

createEmojiPlugin

createImageEditMenuProvider

createListEditMenuProvider

createPasteOptionPlugin

createRibbonPlugin

  • createRibbonPlugin(delayUpdateTime?: number): RibbonPlugin

createTableEditMenuProvider

createUIUtilities

  • createUIUtilities(container: HTMLDivElement, theme: PartialTheme): UIUtilities

getBackgroundColorValue

getColorPickerDropDown

getLocalizedString

  • getLocalizedString<T, R>(strings: LocalizedStrings<T> | undefined, key: T, defaultString: R): string
  • Get a localized string

    Type parameters

    • T: string

    • R: string

    Parameters

    • strings: LocalizedStrings<T> | undefined

      The LocalizedStrings map

    • key: T

      Key of the string

    • defaultString: R

      Default unlocalized string, will be used if strings is not specified or the give key doesn't exist in strings

    Returns string

    A localized string from the string map, or defaultString

getTextColorValue

showInputDialog

  • showInputDialog<Strings, ItemNames>(uiUtilities: UIUtilities, dialogTitleKey: Strings, unlocalizedTitle: string, items: Record<ItemNames, DialogItem<Strings>>, strings?: LocalizedStrings<Strings | OkButtonStringKey | CancelButtonStringKey>, onChange?: (changedItemName: ItemNames, newValue: string, currentValues: Record<ItemNames, string>) => Record<ItemNames, string> | null, rows?: number): Promise<Record<ItemNames, string> | null>
  • Show a dialog with input items

    Type parameters

    • Strings: string

    • ItemNames: string

    Parameters

    • uiUtilities: UIUtilities

      UI utilities to help render the dialog

    • dialogTitleKey: Strings

      Localized string key for title of this dialog

    • unlocalizedTitle: string

      Unlocalized title string of this dialog. It will be used if a valid localized string is not found using dialogTitleKey

    • items: Record<ItemNames, DialogItem<Strings>>

      Input items in this dialog

    • Optional strings: LocalizedStrings<Strings | OkButtonStringKey | CancelButtonStringKey>

      Localized strings

    • Optional onChange: (changedItemName: ItemNames, newValue: string, currentValues: Record<ItemNames, string>) => Record<ItemNames, string> | null

      An optional callback that will be invoked when input item value is changed

        • (changedItemName: ItemNames, newValue: string, currentValues: Record<ItemNames, string>): Record<ItemNames, string> | null
        • Parameters

          • changedItemName: ItemNames
          • newValue: string
          • currentValues: Record<ItemNames, string>

          Returns Record<ItemNames, string> | null

    • Optional rows: number

    Returns Promise<Record<ItemNames, string> | null>

Generated using TypeDoc