Tinderbox Forum

A HoverExpression question ($Tags)

I’ve been experimenting with HoverExpressions to use in Maps. In most cases, I’ve been using $Tags. It works fine in general, but there is an aesthetic issue that I’d like to address if possible:
A few notes have many tags. The tags are shown just as they are in the tags field, i.e. a tag followed by a semicolon, followed immediately by another tag with no space after the semicolon, and so on. The lack of spaces after the semicolons look ugly to me.
I’m wondering if there’s any way to show just one tag, or to show the tags with spaces between them. As I understand it, each tag is a separate item rather than the string of tags including semicolons being an entity as far as Tinderbox is concerned.
I’m assuming that inputting a space after each semicolon would lead to Tinderbox interpreting the spaces as being part of the tags; if I’ve got that wrong, I’d be grateful for a heads-up.


Use something like this in your DisplayExpression:

$Tags.format(", ");

For more information see this.

Deleted (dupe post at same time)

Thank you both.

Hopefully, I’ll find that out soon.

Maybe there is an upper limit, but I haven’t found it yet. I added far more tags than is reasonable to one note to see what would happen, but they all displayed without a hitch.
I’m going to check the reference page you pointed me to and see if I can get them to display in alphabetical order, and maybe with a different font. Thanks to you guys, today has been a productive day in terms of my understanding of Tinderbox.

1 Like

See here. For the font, try $HoverFont (see linked article).

To sort the list use .sort or isort if it needs to be case insensitive. Note that dot-operators like ,format and sort can chain onto one another: List.sort.format(“formatString”). Look at the main list of action codes for more detail: here.

That also worked great. And I found out why my long list of tags was nowhere near enough to be truncated:

The panel is drawn 350 pixels wide with height never exceeding half the Map view’s window height.

Thanks again for all the help.

1 Like

If you want to play around with limits, try this in your hover expression


That will put each tag on a new line.

I tried that out just out of idle curiosity, but it’s actually quite cool to hover the mouse over each note in a map in turn and see a kind of “waterfall” of tags.

1 Like