A new paragraph style

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
Johanna
Propeller Head
Posts: 25
Joined: Wed Feb 25, 2015 3:08 am

A new paragraph style

Post by Johanna »

I would like to provide our software developers a file that they can read to include tool tips in our interface.
At the same time I would like our documentation team to be able to edit the file easily in Flare and Contributor.
So I would like to make the xml or html file as clean as possible with easy tags.
For this I would like to create a new paragraph style that is called e.g. <tooltip> and has the same properties as a paragraph: an end of line at the end of the paragraph.

The stylesheet could look like this:
tooltip
{
margin-top: 5pt;
margin-bottom: 6pt;
}

key
{
font-weight: bold;
}

tip
{
font-style: italic;
}

and the file to share with the developers:
<tooltip>
<key>Keylabel</key>
<tip>Create cut plane using three points or a point and a normal</tip>
</tooltip>
<tooltip>
<key>Label2</key>
<tip>Second tool tip</tip>
<f1ref>../../_url/example.htm</f1ref>
</tooltip>

I would like <tooltip> to behave as a paragraph style but if I add a new style to the stylesheet I don't manage to make it paragraph style. Anybody can help?

Probably I will need to work with sharing the html output with the developer but I am a bit scared that Flare will add things to the file that make it difficult for the library of the dev. to read (e.g. xmlns="")

Anybody experience with this?
kkelleher
Sr. Propeller Head
Posts: 163
Joined: Wed Nov 12, 2008 12:42 pm

Re: A new paragraph style

Post by kkelleher »

Johanna wrote: tooltip
{
margin-top: 5pt;
margin-bottom: 6pt;
}
Johanna wrote:I would like <tooltip> to behave as a paragraph style but if I add a new style to the stylesheet I don't manage to make it paragraph style. Anybody can help?
You need to indicate it in the style name:

Code: Select all

p.tooltip
{
	margin-top: 5pt;
	margin-bottom: 6pt;
}
Johanna wrote:I am a bit scared that Flare will add things to the file that make it difficult for the library of the dev. to read (e.g. xmlns="")?
While I haven't had this case, my advice would be to only ever use the Internal Text Editor and never the XML Editor when working with this CSS. Flare can definitely do unexpected things when you use the XML Editor.

Thanks,

Kristen
Kristen Kelleher
Director of Tech Pubs, TIBCO Jaspersoft
Johanna
Propeller Head
Posts: 25
Joined: Wed Feb 25, 2015 3:08 am

Re: A new paragraph style

Post by Johanna »

Thank you very much Kristen,

Indeed defining a class of p would work but this would create long tags like <p class="tooltip"> and I was hoping there would be something that would look a bit cleaner especially
for those who would use it in a text editor. But I guess there is no such way.

The advantages of Flare in this context would only be:
- the WYSIWYG xml editor for the people who need to contribute in content. They would not see all the tags.
- the possibility to translate the tooltips with the help of Lingo in another language.

If I don't use Flare xml editor, I might just as well use any basic text editor (notepad++ or vi) and use whatever tags we like.
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: A new paragraph style

Post by doc_guy »

Flare won't let you use custom XML to do this. It is designed to use classes of existing HTML elements, or classes of XML elements that have been defined by the MadCap schema. If you were to insert a new XML element, then you would need to customize all of Flare's XSLT transforms (the magic behind how Flare builds all the different output types) to know how to handle these custom XML elements.

I doubt you are ever going to see Flare support user-defined XML elements. It is way outside the scope of Flare's editor and purpose.
Paul Pehrson
My Blog

Image
Post Reply