This is a demo of the custom tooltip API. This isn't a plugin that can be installed and it shouldn't be copied directly. It is an example of how you can register a custom function to render tooltips.
Create a function that takes two parameters. The first is the div element to render the tooltip DOM into. The second is the element being moused over. You can get the tooltip string for the element by calling Blockly.Tooltip.getTooltipOfObject(element)
. Do any custom logic you like to render the tooltip into the given div. Register your function with Blockly by calling Blockly.Tooltip.setCustomTooltip(yourFunction)
. Your function will be called instead of the default rendering logic whenever a tooltip should be shown.
Apache 2.0