[]
        
(Showing Draft Content)

TextMarkupContextMenuSettings

Type Alias: TextMarkupContextMenuSettings

type TextMarkupContextMenuSettings = object;

Configuration options for the text markup context sub-menu.

Type declaration

colors

colors: 
  | object[]
  | {
  highlight: object[];
  squiggly: object[];
  strikeout: object[];
  underline: object[];
 }
  | false;

Defines the available color options in the text markup context menu.

  • An array of colors applies the same color options to all markup types.
  • An object with specific markup types allows defining different color sets for each type.
  • Setting this to false disables the color selection in the text markup context menu.

Examples

// Customize available colors for all text markup types:
textMarkupContextMenu: {
  colors: [
    { value: "#ff0000", displayName: "Red" },
    { value: "#000000", displayName: "Black" }
  ]
}
// Hide all color options in the text markup sub-menu:
textMarkupContextMenu: { colors: [] }
// Define specific colors for each text markup type:
textMarkupContextMenu: {
  colors: {
    highlight: [
      { value: "#ff0000", displayName: "Red" },
      { value: "#000000", displayName: "Black" }
    ],
    underline: [
      { value: "#ff0000", displayName: "Red" }
    ],
    strikeout: [
      { value: "#000000", displayName: "Black" }
    ],
    squiggly: [
      { value: "#ff0000", displayName: "Red" }
    ]
  }
}