setTooltip
Official
Set a tooltip on an element.
Import:
import { setTooltip } from 'obsidian';Example:
setTooltip(document.body, 'foo');Signature:
function setTooltip(el: HTMLElement, tooltip: string, options: TooltipOptions | undefined): voidParameters:
| Parameter | Type | Description |
|---|---|---|
el | HTMLElement | The element to show the tooltip on. |
tooltip | string | The tooltip text to show. |
options | TooltipOptions | undefined | The options for the tooltip. |
Returns: void
Example:
setTooltip(document.body, 'foo');Links to this page: