Adding custom tags

This forum is for all Flare issues not related to any of the other categories.
Post Reply
Dennetti
Propeller Head
Posts: 50
Joined: Fri Sep 21, 2018 1:42 am

Adding custom tags

Post by Dennetti »

I have the following problem using RoboHelp 2017, and wondered if moving to Madcap Flare would get round the problem. We currently use tooltips in the application that link to the relevant Help content in the Help output. To identify the content that is required by the tooltips, I add tags to the start and end of the relevant content in each Help topic. They use the following format:
<tooltipabc>
</tooltipabc>
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: in Flare, can you hide this tooltip information within a topic without using tags like 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. It would be great to know if Flare would accept these custom tags without any problems, and this would be a big incentive to move away from RoboHelp.
devjoe
Sr. Propeller Head
Posts: 337
Joined: Thu Jan 23, 2014 1:43 pm

Re: Adding custom tags

Post by devjoe »

It should be possible to hide this information using a real tag which is formatted by your stylesheet to not display, but so it can be extracted from the topic by software. For example, <div class="tooltip">...</div> with div.tooltip { display:none;} in the stylesheet.
Dennetti
Propeller Head
Posts: 50
Joined: Fri Sep 21, 2018 1:42 am

Re: Adding custom tags

Post by Dennetti »

Thanks very much, that's good to know.
Dennetti
Propeller Head
Posts: 50
Joined: Fri Sep 21, 2018 1:42 am

Re: Adding custom tags

Post by Dennetti »

Hi. I have tried this suggestion, but with no success I'm afraid. When using Div or Span classes in a table, the table row becomes hidden. If anyone can suggest a way to add a tag or other content which could be hidden from the output, that would be great.
Cheers,
Mark
jjw
Sr. Propeller Head
Posts: 133
Joined: Thu May 08, 2014 4:18 pm
Location: Melbourne

Re: Adding custom tags

Post by jjw »

What about putting the text in a data attribute (like data-tooltip)?
Dennetti
Propeller Head
Posts: 50
Joined: Fri Sep 21, 2018 1:42 am

Re: Adding custom tags

Post by Dennetti »

Could you advise on how to do this please?
Dennetti
Propeller Head
Posts: 50
Joined: Fri Sep 21, 2018 1:42 am

Re: Adding custom tags

Post by Dennetti »

I tried the following, but no luck (the row in table gets hidden):

Added the following to the CSS:

[data-content]:before {
content: attr(data-content);
}

Added the following to the topic:
<div data-content="Some content goes here.">
</div>

Cheers,
Mark
NorthEast
Master Propellus Maximus
Posts: 6363
Joined: Mon Mar 05, 2007 8:33 am

Re: Adding custom tags

Post by NorthEast »

Dennetti wrote:I tried the following, but no luck (the row in table gets hidden):
Are you sure the table row being hidden has anything to do with this?
I don't really see the connection, since nothing in this thread seems related to tables.

I'd suggest pressing f12 in the browser and inspecting the HTML and CSS in the output.
Dennetti
Propeller Head
Posts: 50
Joined: Fri Sep 21, 2018 1:42 am

Re: Adding custom tags

Post by Dennetti »

Sorry, I should have explained that I am trying to specify tooltip content in a table row. Tables in Flare do not seem to like the tags that I have tried so far.
NorthEast
Master Propellus Maximus
Posts: 6363
Joined: Mon Mar 05, 2007 8:33 am

Re: Adding custom tags

Post by NorthEast »

Dennetti wrote:Sorry, I should have explained that I am trying to specify tooltip content in a table row. Tables in Flare do not seem to like the tags that I have tried so far.
If you use Flare's table stylesheets on a table, then Flare will automatically reformat the table's HTML and apply classes to all the table tags, and probably remove stuff that you insert manually. Anything inside the cells (td tag) will be left alone, so you can add it there.

A table that doesn't use table stylesheets won't be affected by this.
Dennetti
Propeller Head
Posts: 50
Joined: Fri Sep 21, 2018 1:42 am

Re: Adding custom tags

Post by Dennetti »

Thanks. This works fine. The only downside is that multiple pairs of tags would be needed within a table row (one pair for each column). If this is the only way I can add these tags within a table, I guess the Development team would have to work round this when linking to the tooltips. Thanks for your advice.
Post Reply