Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Linebreak in tooltip?

Is there a way to have a linebreak in the tooltip? I am using TokenMod to put character's AC, Move Speed, Passive Perception, and save DC, but without linebreaks, it looks very cluttered. Is it possible to add them in? Here is the token mod command I am using, I don't think this question is API related, but figured I would post it anyways if it helps. !token-mod {{   --set     represents|@{Frank|character_id}     name|"Frank"     bar1_link|ac     bar2_link|speed     bar3_link|hp     tooltip|"AC: @{selected|AC}; PP: @{selected|passive_wisdom}; Move Speed: @{selected|speed}; Save DC: @{selected|spell_save_dc}"     defaulttoken   --on      show_tooltip }}
1639224321
Andrew R.
Pro
Sheet Author
I don’t think TokenMod can do that right now IIRC. Ask in the TokenMod thread in the API forum for the explanation from The Aaron. 
Thanks Andrew, I didn't know if line breaks would be something that just vanilla tooltips could do with the proper formatting or not, I only was leaving that as an explanation for what I was trying to do, I'll try in the TokenMod thread as you suggested though.
1639240203
Gold
Forum Champion
If you can't get linebreaks, try using a symbol in between like  HP 11 ★ AC 10 ★ STR 18 HP 11 • AC 10 • STR 18 to help with visual separation in-line
1639282929
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
AFAIK, line breaks are not possible with tooltips. They are very limited.
1639289622

Edited 1639290454
Oosh
Sheet Author
API Scripter
It's kind of possible-ish. With some CSS via Stylus: #editor-wrapper #token-tooltip { white-space:pre-wrap; } And inserting the following into the token's tooltip from devTools: blah\nblah\nblah\nblah You can get this: I'm not sure if a \n newline will make the journey via token-mod or not, but you can try it. This is relying on a CSS rule edit that will only be visible in your own browser. If there's nothing in Roll20's parser or CSS to tell the tooltip to recognise any new line characters, I'm not sure what else would work. I tried forcing a new line by inserting loads of   into the tooltip, but it just broke the tooltip. edit - actually, line breaks work fine in the regular old token UI with the above CSS. It's just the styling Roll20 have chosen - plain <span> style - which trims whitespace & ignores line breaks. e.g a a b c will be displayed as "a a b c".
1639291133
Andrew R.
Pro
Sheet Author
I requested Markdown formatting for tooltips in the initial release feedback thread.  <insert “WhenYou Wish Upon a Star” here>