Any way to use addTooltip dynamically across the entire system? Where does any html element that has the webix_tooltip attribute become a tooltip ?
There isn’t really a way to init tooltips dynamically for all the views/elements on the page. Technically, it is possible to iterate over all the existing Webix views on the page and add a tooltip to each one of them that way, e.g.:
for (const view in webix.ui.views) {
webix.TooltipControl.addTooltip(webix.ui.views[view].$view, "some tooltip");
}
However, this kind of approach won’t work for dynamically added views (essentially, these will need to come with tooltips preconfigured, or you will need to call the addTolltip() method each time a new view/elements gets added to the page).
Alternatively, you could also init a separate tooltip view, and work with separately (e.g., change its content based on the element it’s hovering over, etc.)
Where does any html element that has the webix_tooltip attribute become a tooltip ?
The webix_tooltip attribute can be used anywhere to set a tooltip for the target element. When working with Webix views (with things like templates), you don’t need to take any extra steps - simply defining the tooltip is enough for proper initialization (e.g.: Code Snippet). Additionally, you may also set a tooltip for other HTML elements using the same attribute, but in this case you will also need to initialize it by calling the addTooltip() method (e.g., Code Snippet - the fieldset uses tooltips defined by webix_tooltip).
See our documentation for more information on tooltips.