How do I apply a code style?

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
milkor
Jr. Propeller Head
Posts: 5
Joined: Wed Jun 27, 2012 2:46 pm

How do I apply a code style?

Post by milkor »

Hi, I am trying to convert a paragraph of mine to a code style, like this:

Code: Select all

<b>This is a code sample</b>
But I cannot find that style even though it is in my CSS stylesheet. When my cursor is in a <p> paragraph, I do not see it in the Styles window. For that matter, I don't see it anywhere, no matter where I look.

I tried using the Insert > Code feature, but it is not working as described in the online help; my code sample does not appear in any type of output. I see the yellow marker in my working pages to indicate that it's there, but it doesn't appear.

Thanks.
i-tietz
Propellus Maximus
Posts: 1219
Joined: Wed Oct 24, 2007 4:13 am
Location: Fürth, Germany

Re: How do I apply a code style?

Post by i-tietz »

For me the pre tag does that job.
Inge____________________________
"I need input! - Have you got input?"
kwag_myers
Propellus Maximus
Posts: 810
Joined: Wed Jul 25, 2012 11:36 am
Location: Ann Arbor, MI

Re: How do I apply a code style?

Post by kwag_myers »

You can also turn off the tags in your editor pane, or switch to text editor and use HTML character codes:

Code: Select all

 <b>test</b>
comes out as <b>test</b>.
"I'm tryin' to think, but nothin' happens!" - Curly Joe Howard
Phlawm53
Sr. Propeller Head
Posts: 442
Joined: Tue Mar 16, 2010 10:58 am
Location: San Francisco, CA
Contact:

Re: How do I apply a code style?

Post by Phlawm53 »

Not sure I completely understand the question, but maybe this will help.

The <code> tag is applied to characters. IF you have a paragraph, AND some subset of text in that paragraph needs to be formatted as (typically monospaced) code, THEN you select the characters and wrap them in <code> </code> tags.

If on the other hand you're trying to format an entire block of text so that white space such as line breaks, blanks, tabs and multiple spaces between words are preserved, then use <pre> </pre> tags. See:

http://labnol.blogspot.com/2006/10/html ... -code.html

I'll note in passing that Flare doesn't make it easy to apply span classes such as <code> </code> to all of the characters in a line or block of text. The "trick" is to add an extra space to to the beginning or end of the line, then select all the characters except the space: Flare will then include span classes such as code in the list of available choices. That may explain why Flare isn't offering you the choice of code…(?)

Cheers & hope this helps,
Riley
SFO
Post Reply