Skip to content

Tooltips

If you’re every finding yourself needing to place an element at the editor’s cursor, the addTooltip() utility can help. This utility is used by autoComplete() to position the completions. Note that the cursorPosition() extension is required before the tooltip can be shown.

The editor below shows how to use addTooltip() to add a tooltip telling a user they cannot edit a read-only editor. Try typing in the editor below.

The following styles are added to the tooltip: