Applying <pre> tags to blocks of code

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
oceanclub
Sr. Propeller Head
Posts: 277
Joined: Thu Oct 10, 2013 4:45 am
Location: Dublin

Applying <pre> tags to blocks of code

Post by oceanclub »

Does anyone know how to easily and consistently apply <pre>... </pre> tags to blocks of code in Flare?

I only just realised that by default Flare doesn't treat <pre> tags as they should and whitespace isn't preserved. You have to use <pre xml:space="preserve"> ... </pre> instead.

But if <pre> is applied by the Home > Style dropdown, it doesn't apply this qualifier and so the code just runs into itself. (I have no idea why you would use <pre> while not wanting to preserve whitespace but....)

Is there only way to format code via the text editor, or is there a way to apply <pre xml:space="preserve"> via the XML editor?

Paul
ChoccieMuffin
Senior Propellus Maximus
Posts: 2650
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Applying <pre> tags to blocks of code

Post by ChoccieMuffin »

If you don't get a "proper" answer, could you create a snippet with the correctly formatted (empty) pre that you then convert to text, rather than having to edit it each time? I do this for a particular table style that I use often and it reduces the number of keystrokes and button clicks I have to do.
Started as a newbie with Flare 6.1, now using Flare 2024r2.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
oceanclub
Sr. Propeller Head
Posts: 277
Joined: Thu Oct 10, 2013 4:45 am
Location: Dublin

Re: Applying <pre> tags to blocks of code

Post by oceanclub »

ChoccieMuffin wrote:If you don't get a "proper" answer, could you create a snippet with the correctly formatted (empty) pre that you then convert to text, rather than having to edit it each time? I do this for a particular table style that I use often and it reduces the number of keystrokes and button clicks I have to do.
That's a good idea! I'll certainly do that in the meantime.

P.
Post Reply