Displays a command tooltip above the currently active line selection, with clickable elements.

Internally it is a composite of two tooltips, one for the main tooltip and one for the overflowing commands. The commands are added sequentially in registration order. When attached to an editor, it is either always shown or only when the active line is hovered with mouse, depending on the alwaysShow property.

Constructors

  • Parameters

    • parentNode: HTMLElement
    • Optional options: Partial<CommandBarOptions>

    Returns CommandBarTooltip

Properties

$alwaysShow: boolean
$hideTooltipTimer: {
    schedule: { (timeout?: number): void; delay(timeout?: number): void; schedule: ...; call(): void; cancel(): void; isPending(): any; };
    call(): void;
    cancel(): void;
    delay(timeout?): void;
    isPending(): any;
    (timeout?): void;
}

Type declaration

    • (timeout?): void
    • Parameters

      • Optional timeout: number

      Returns void

  • schedule: { (timeout?: number): void; delay(timeout?: number): void; schedule: ...; call(): void; cancel(): void; isPending(): any; }
  • call:function
  • cancel:function
  • delay:function
    • Parameters

      • Optional timeout: number

      Returns void

  • isPending:function
$mouseInTooltip: boolean
$showTooltipTimer: {
    schedule: { (timeout?: number): void; delay(timeout?: number): void; schedule: ...; call(): void; cancel(): void; isPending(): any; };
    call(): void;
    cancel(): void;
    delay(timeout?): void;
    isPending(): any;
    (timeout?): void;
}

Type declaration

    • (timeout?): void
    • Parameters

      • Optional timeout: number

      Returns void

  • schedule: { (timeout?: number): void; delay(timeout?: number): void; schedule: ...; call(): void; cancel(): void; isPending(): any; }
  • call:function
  • cancel:function
  • delay:function
    • Parameters

      • Optional timeout: number

      Returns void

  • isPending:function
commands: {}

Type declaration

    editor: Editor
    elements: {}

    Type declaration

      eventListeners: {}

      Type declaration

        maxElementsOnTooltip: number
        moreOptions: Tooltip
        moreOptionsEl: any[] | HTMLElement | Text
        parentNode: HTMLElement
        tooltip: Tooltip
        tooltipEl: any[] | HTMLElement | Text

        Methods

        • Parameters

          • id: string
          • command: TooltipCommand
          • forMainTooltip: boolean

          Returns void

        • Parameters

          • Optional enableHover: boolean

          Returns void

        • Attaches the clickable command bar tooltip to an editor

          Depending on the alwaysShow parameter it either displays the tooltip immediately, or subscribes to the necessary events to display the tooltip on hover.

          Parameters

          • editor: Editor

          Returns void

        • Registers a command on the command bar tooltip.

          The commands are added in sequential order. If there is not enough space on the main toolbar, the remaining elements are added to the overflow menu.

          Parameters

          • id: string
          • command: TooltipCommand

          Returns void

        • Sets the display mode of the tooltip

          When true, the tooltip is always displayed while it is attached to an editor. When false, the tooltip is displayed only when the mouse hovers over the active editor line.

          Parameters

          • alwaysShow: boolean

          Returns void

        • Updates each command element in the tooltip.

          This is automatically called on certain events, but can be called manually as well.

          Returns void

        • Updates the position of the command bar tooltip. It aligns itself above the active line in the editor.

          Returns void

        Generated using TypeDoc