How to make multiple tooltips on one RichTextLabel

Godot Version

4.7.2

Question

I have a RichTextLabel that automatically formats certain words (the names of stats) into certain colours, and I want these words to display a tooltip when hovered over that says what the stat does. The RichTextLabel is part of an item choice UI that looks like this:


I want tooltips to appear when the player hovers over a coloured word for a few seconds, with control over what it says.
Scene tree setup:

You can use the bbcode [url] tag and the signals RichTextLabel.meta_hover_started and RichTextLabel.meta_hover_ended to show and hide a tooltip.

You could also use Control._get_tooltip() but you need the position and it’s not something you can get from the RichTextLabel control.