To identify the content that is required by tooltips in my application, I currently add tags to the start and end of the relevant content in each Help topic. They use the following format:
The relevant tooltip content is picked up by the software, which is great. However, RoboHelp does not like them as it sees them as alien, and highlights them in red. When they are used within tables, they appear to corrupt the table, and make it hard to edit it. My question please: could anyone suggest a way of hiding information within a topic that does not involve using tags such as these? This information should not be visible to the reader, but could hopefully be picked up by the application, which would look for tags beginning with a certain word, for example, "tooltip". I currently use the HTML5 output. I'd really appreciate any advice on this. Thanks.
I don't think it is what you want but maybe Item 6 at Snippets will lead you somewhere.
See www.grainge.org for free RoboHelp and Authoring information.
Assuming that the application slurps in the content surrounded by the custom tags (that is, you want to use the content in the application, not put a tooltip over the content in your help file) then I think the data-* attributes are what you want. You'd have to enter them in the code and I can't guarantee that RH will leave them alone, but worth a try. (For what it's worth, RH11 seems to leave the attribute alone both after editing a topic and when generated.)
Thanks both. I do want to use the content in the application, but need the tags to be hidden in the displayed topic. I have had a quick try at getting this working by adding
<article> tags and then adding 'data' items within them, but found that anything within these tags is displayed when I preview the topic.
Thinking about it again, I think it's not going to do what you want, as you'd need to put the content in the data-xx attribute.
e.g <span data-tooltip="This is my tooltip content">This is my tooltip content</span>
Unless it's more extensible that I think. But you'd have to ask web developers about it.
So, next idea is to use an id. The id attribute can go on any tag as far as I'm aware, so you could put it on a p, or wrap what you need in a span or a div, depending on your needs.
<p id="apptooltip">This is my tooltip content</p>
Similar to the data-xx, you can't see that it's set in the RH interface, but you could apply a hack so the style displays in RH but not in browser (As far as I can tell. But no guarantees.)
The css you need is:
background-color: pink !rhstyle;
Thanks very much. Really appreciate your advice. Haven't had time to test this yet in my environment, but will let you know how I get on ASAP. Cheers,
Hi. I have tried adding <span id=”tooltipX”></span> tags within a table in RoboHelp, and unfortunately the application would not accept them, and tries to strip them out. They appear to work OK outside of tables. The tricky challenge is to find a way to add tooltip tags within a table. If you have any other suggestions, they would be much appreciated.
Thanks for the link. However, this does not do quite what I need. I don't need to add a pop-up tooltip in the RoboHelp topic. I actually need to add hidden tags within RoboHelp tables that our software application can use to identify the tooltip content it needs to display in the software. I feel there must be a way to do this within a table, but I can't find a way of doing this that RoboHelp is happy with.
What if you add the id on the td tag instead? Does your application pick that up?
Otherwise, I think you'll need to talk to your developers to see if they can make changes to how the application detects the text you need. There doesn't seem to be any problem with the span tag making it in to the output, at least in the small test I tried (RH2017, Responsive HTML5, Indigo).
Thanks for the suggestion to try adding the id on the td tag instead. I created a new character style for tooltips and applied it to the relevant cells in a table. I then edited the HTML, changing the tag name to a unique tooltip tag name. This tag survived the output, which is great. The only problem is that a </span> tag is added in each cell, but I'd hope our developers could get round that. I tried removing this tag but RoboHelp adds it in again when you come out of HTML view. I think this will be a much better solution as RoboHelp no longer highlights the tags in red, and hopefully now sees them as "native".