Ace API Reference
    Preparing search index...

    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.

    Index

    Constructors

    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?: number): void;
        isPending(): any;
        (timeout?: number): void;
    }
    $mouseInTooltip: boolean
    $showTooltipTimer: {
        schedule: { (timeout?: number): void; delay(timeout?: number): void; schedule: ...; call(): void; cancel(): void; isPending(): any; };
        call(): void;
        cancel(): void;
        delay(timeout?: number): void;
        isPending(): any;
        (timeout?: number): void;
    }
    commands: {}
    editor: Editor
    elements: {}
    eventListeners: {}
    maxElementsOnTooltip: number
    moreOptions: Tooltip
    moreOptionsEl: any
    parentNode: HTMLElement
    tooltip: Tooltip
    tooltipEl: any

    Methods

    • Parameters

      • OptionalenableHover: 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

      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