displayTooltip
Official
Manually trigger a tooltip that will appear over the provided element. To display a tooltip on hover, use setTooltip instead.
Import:
import { displayTooltip } from 'obsidian';Example:
displayTooltip(document.body, 'foo');Signature:
function displayTooltip(newTargetEl: HTMLElement, content: string | DocumentFragment, options: TooltipOptions | undefined): voidParameters:
| Parameter | Type | Description |
|---|---|---|
newTargetEl | HTMLElement | The element to display the tooltip over. |
content | string | DocumentFragment | The content of the tooltip. |
options | TooltipOptions | undefined | The options for the tooltip. |
Returns: void
Example:
displayTooltip(document.body, 'foo');