One of the products that I document is a small application that runs on smart phones. Because it runs on several different phones that all display HTML in different ways, our software developers have come up with a style guide for HTML code that is very restrictive, but it applies to the online help I'm producing as well as to the software. If I don't follow those guidelines, the online help display will be really ugly.
One of the issues is the <p></p> style element. It can't be used at all because, on some phones, it results in a huge double space between paragraphs and on other phones, it's ignored, so paragraphs run together. So the developers have asked me to find a way to eliminate the <p></p> tags altogether and use <br/><br/> to separate paragraphs. Is that possible in Flare?
In addition, no javascript is allowed in the online help. The good news is that it's context-sensitive help only, and we have no use for a viewer/UI with skins, navigation, etc, so the lack of javascript isn't really a problem. I just need to deliver the individual help files to the developers for integration with the software, not a complete, compiled help system. So that's all good.
The big complication for me is that the same content has to be produced in PDF and Word formats, as well as online help. So, ideally, I'd like to maintain one set of content files in Flare that I can output for all purposes.
One thing we've found is that the source files are cleaner than the output files (any output type). There's no javascript in the source files, and the heads are much less complex. So I'm thinking I'll just give them the source files. However, those pesky <p></p> tags are still a problem.
Have you ever run into this issue before? Do you have any suggestions for me about how to solve it within Flare? I'd rather not take those files out of Flare and edit them by hand each time I have to make a delivery. It's a small document (15 files) right now, but it won't always stay that way... and even 15 files to edit by hand just before a release is asking for trouble. So I'd appreciate any suggestions you might have.
Tnx,
cj
Need to replace <p></p> tags with <br/>s
-
GregStenhouse
- Sr. Propeller Head
- Posts: 330
- Joined: Tue May 13, 2008 3:27 pm
- Location: Christchurch, New Zealand
Re: Need to replace <p></p> tags with <br/>s
You can eliminate <P> tags by right clicking on the "p" box on the left-side of the editor (I think they're called structure bars), and select Edit>Unbind. You're going to have a hard time applying styles though (possibly only at the character level???) so trying to get word or PDF looking good is going to be a mission.
Cheers
Greg
Cheers
Greg
Re: Need to replace <p></p> tags with <br/>s
You can't not have some type of container tag. The paragraph tag is the most common, but you have to have something. You can't just have soft line breaks (<br />) by themselves to separate text. And that's not a Flare restriction -- that's a basic HTML structure requirement.
You could try using <div> tags instead of the <p> tag. The DIV will be honored by online output and PDF output, but Word has problems with DIV tags. If you don't do any positioning or layering with the DIV tags then Word I think will convert them to <p> tags without too much problems, but if you try to do anything fancy with the DIV then Word will most likely ignore it. You'd have to test using DIVs, though, in the smart phones. I mean, if they have problems with <p> tags then they'll probably have problems with <div> tags.
Have you considered generating a PDF version for the smart phone output instead of a WebHelp-based output? If they can't handle HTML tags, then perhaps a PDF file with links is the way to go. Plus you have greater control over the PDF output because you can have different sets of page layouts for different PDF outputs. For instance, I have one set of page layouts for printing from an online PDF output that will print on 8.5 x 11 paper, and a second set of layouts for generating a PDF output in a 5" x 8" format for sending for outside printing and binding.
As for using the same set of source files... It's possible, but you'll want to either use mediums for the differentiating the appearance between normal online output and output generated for the smart phones. You'll probably also need to apply some conditional tag, since some effects and content you may want to include in online output because you have more room, but may be unnecessary for the smart phone output.
You could try using <div> tags instead of the <p> tag. The DIV will be honored by online output and PDF output, but Word has problems with DIV tags. If you don't do any positioning or layering with the DIV tags then Word I think will convert them to <p> tags without too much problems, but if you try to do anything fancy with the DIV then Word will most likely ignore it. You'd have to test using DIVs, though, in the smart phones. I mean, if they have problems with <p> tags then they'll probably have problems with <div> tags.
Have you considered generating a PDF version for the smart phone output instead of a WebHelp-based output? If they can't handle HTML tags, then perhaps a PDF file with links is the way to go. Plus you have greater control over the PDF output because you can have different sets of page layouts for different PDF outputs. For instance, I have one set of page layouts for printing from an online PDF output that will print on 8.5 x 11 paper, and a second set of layouts for generating a PDF output in a 5" x 8" format for sending for outside printing and binding.
As for using the same set of source files... It's possible, but you'll want to either use mediums for the differentiating the appearance between normal online output and output generated for the smart phones. You'll probably also need to apply some conditional tag, since some effects and content you may want to include in online output because you have more room, but may be unnecessary for the smart phone output.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
-
KevinDAmery
- Propellus Maximus
- Posts: 1985
- Joined: Tue Jan 23, 2007 8:18 am
- Location: Darn, I knew I was around here somewhere...
Re: Need to replace <p></p> tags with <br/>s
Just to clarify, when you say <p></p> do you mean you can't use p tag sets at all, or that you just can't use a <p></p> pair to add spacing between blocks of text? For example:
If the latter, what you could do is do a find and replace in source code to replace <p></p> with <br />. If you're talking about not having p tag sets at all, though, I agree with Lisa that that's not really going to fit in the HTML spec.
Code: Select all
<p>This is paragraph 1.</p>
<p></p>
<p>This is paragraph 2.</p>Until next time....

Kevin Amery
Certified MAD for Flare
Kevin Amery
Certified MAD for Flare