Line breaks in Imagemap Screen Tips?

This forum is for all Flare related Tips and Tricks.
Have a tip or trick you use while working in Flare? Share it here.
Post Reply
bgilliland
Propeller Head
Posts: 13
Joined: Fri Sep 11, 2015 12:44 pm

Line breaks in Imagemap Screen Tips?

Post by bgilliland »

Looking to simplify a workflow and put useful info in the imagemap screen tip that serves both as the tooltip hover text and screen reader alt text.

For tooltip readability, I really need the option to insert a line break or two. I know this is (mostly) possible in the real world using a line break in the html file, but I can't insert one into the Screen Tip field in Flare.

I've tried every variation of &#10 and &#13 I can think of, but those still come through as actual characters in the tooltip. I'm even trying it with using a variable for a line break.
ScreenTip_LineBreaks.png
Ideas? Anyone done something like this before?

(ps - I know that I could link to popups from the imagemap, but I just have too many files I would have to create on dozens of imagemaps, and would prefer to just use the tooltip text for now)

Thanks!

Beth
You do not have the required permissions to view the files attached to this post.
trent the thief
Propellus Maximus
Posts: 608
Joined: Wed Feb 01, 2006 6:21 am
Location: Off in the dark....

Re: Line breaks in Imagemap Screen Tips?

Post by trent the thief »

Hi Beth,

I believe you need to also add the semi-colon. Try "
"

If not, try "

" together.
Trent.

Certifiable.

Image

umm...
I meant MAD Certified.

Official Propeller Beanie Owner :-)

:flare: Are you on Flare's Slack channels? PM me for an invitation! :flare:
bgilliland
Propeller Head
Posts: 13
Joined: Fri Sep 11, 2015 12:44 pm

Re: Line breaks in Imagemap Screen Tips?

Post by bgilliland »

Thanks - I guess I typed a little fast on that one, but I had tried with semi-colons as well. Also tried on your suggestion combining the two - but still no dice. The result is just the characters printing directly in the tooltip (i.e. - "...Season

Production...")
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Line breaks in Imagemap Screen Tips?

Post by NorthEast »

bgilliland wrote:Thanks - I guess I typed a little fast on that one, but I had tried with semi-colons as well. Also tried on your suggestion combining the two - but still no dice. The result is just the characters printing directly in the tooltip (i.e. - "...Season

Production...")
Try going to Text Editor view and entering that code directly in the title and alt properties -
or
worked for me.
trent the thief
Propellus Maximus
Posts: 608
Joined: Wed Feb 01, 2006 6:21 am
Location: Off in the dark....

Re: Line breaks in Imagemap Screen Tips?

Post by trent the thief »

I haven't figured a way to do this from a styleheet, but from the text editor add this:

style="white-space: pre-line;"

to the <Area> element for your imagemap. That lets the
function as expected. The tool tip will break where you've dropped the &#13. It's a workaround until someone finds the "works ever time" answer. It possible to style area tags, bu tI haven't figured out how to do so from a stylesheet.

If you only need it as a workaround for a handful of tags, it's better than nothing.

Image


Image
Trent.

Certifiable.

Image

umm...
I meant MAD Certified.

Official Propeller Beanie Owner :-)

:flare: Are you on Flare's Slack channels? PM me for an invitation! :flare:
bgilliland
Propeller Head
Posts: 13
Joined: Fri Sep 11, 2015 12:44 pm

Re: Line breaks in Imagemap Screen Tips?

Post by bgilliland »

Thanks all for your suggestions! I really needed the hack *not* to be at the individual page level (like your suggestion of editing the title, Dave) - but instead to be usable across hundreds of screentips on dozens of pages. So I worked for quite awhile this morning after posting on using variables (since those are "allowed" in Screen Tips) and finally hit the jackpot!

I edited a new variable .flvar XML file directly in Notepad++ as it seemed to be the only way to put in an actual CRLF that would be read by the browser as a line break. The really interesting part is that when the build runs, I can view the page source to see that the CRLF was converted into
which is the only way I've seen the browser allow a line break in the tooltip. I was not able to get Flare to honor *only* a line break in the variable, so I also added a bullet, which actually works perfectly for my situation.
screentip_break_yes.png
So as long as no one edits my variables from the Flare interface, I should be golden! Thanks for all the tips and tricks here and throughout the forums - I knew I was right to ask here first!
You do not have the required permissions to view the files attached to this post.
trent the thief
Propellus Maximus
Posts: 608
Joined: Wed Feb 01, 2006 6:21 am
Location: Off in the dark....

Re: Line breaks in Imagemap Screen Tips?

Post by trent the thief »

That tip is archive worthy!! Very well done! :!:
Trent.

Certifiable.

Image

umm...
I meant MAD Certified.

Official Propeller Beanie Owner :-)

:flare: Are you on Flare's Slack channels? PM me for an invitation! :flare:
doloremipsum
Sr. Propeller Head
Posts: 290
Joined: Mon Aug 26, 2019 2:11 pm

Re: Line breaks in Imagemap Screen Tips?

Post by doloremipsum »

Sorry to necro an old thread, but I'm going crazy over here... I've been trying to create screen tips with line breaks in them (not on an image map, just using the title attribute on an image). The funny thing is, on 2021 R2 I'm getting exactly the opposite behaviour from what bgilliland has described here.

My variable has the following code (created in Notepad++):

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<CatapultVariableSet>
  <Variable
    Name="LineBreak"
    Comment="Line break for tooltips"
    EvaluatedDefinition="
-">
-</Variable>
</CatapultVariableSet>
I've added it to the the image like so:

Code: Select all

<img src="10441.jpg" title="Top: Puzzle [%=Punctuation.LineBreak%]Bottom: Missing piece" />
And the result I get is this:
Screentip with variable.png
So the variable approach doesn't seem to be working for me. But wait, if I just use the Unicode characters in my title...

Code: Select all

<img src="10441.jpg" title="Top: Puzzle 
-Bottom: Missing piece" />
It works!
Screentip with CRLF.png
(At least it does for the WebHelp output I'm using - still doesn't seem to work for HTML5. )

But... I need to bring all of these screentips into Lingo for translation. Unfortunately if they just use the CRLF characters, Lingo helpfully converts them to line breaks in the XLF file, which will not come through to the translated output.

So I would really prefer to use the variable if I can, but I just can't make it work the way it apparently did for the OP 4 years ago. Maybe Madcap changed how whitespace is handled in variables? Does any one have any ideas? I am en aporia.
You do not have the required permissions to view the files attached to this post.
in hoc foro dolorem ipsum amamus, consectimur, adipisci volumus.
Post Reply