Atom Tooltip View instance


#1

I would like to use the Atom TooltipManager. This works but I can only add HTML elements. It does not handle events because I do not pass an instance. I’m looking for a solution similar to Atom GitHub status bar.

Is it possible somehow to pass a View instance to Tooltip?

Or I need to set up events after clicking.

What’s the best way to do this?

status-bar


#2

I change simple options :open_mouth:

Before

this.subscriptions.add(
  atom.tooltips.add(this, {
    html: true,
    trigger: 'click',
    title: this.innerBar.element.outerHTML,
  }),
);

After

this.subscriptions.add(
  atom.tooltips.add(this, {
    item: this.innerBar.element,
    class: 'PopoverTooltip',
    trigger: 'click',
    placement: 'top',
  }),
);