colored syntax formatting
-
- Propellus Maximus
- Posts: 574
- Joined: Tue Oct 03, 2006 7:56 am
- Location: Seattle, WA
- Contact:
colored syntax formatting
I would like to copy SQL queries to a Flare topic in such a way that colored syntax formatting is retained. Many reviewers of the docs have requested this formatting. The <pre> tag preserves spacing but not color. I dread the thought of meticulously applying span tags to each phrase in a lengthy code snippet that I want to have a particular color as shown in a code editor. Any ideas?
Pamela Denchfield
http://www.pameladenchfield.com
http://www.pameladenchfield.com
-
- Propellus Maximus
- Posts: 1979
- Joined: Tue Nov 28, 2006 11:18 am
- Location: Crossroads of the West
- Contact:
Re: colored syntax formatting
The only way I know how to color things automatically is by using classes in the style sheet. But I can't see how that will work for your queries automatically. The color isn't inherent in the SQL query; it is just how your SQL editor or text editor displays the code. So if you want to maintain the color, you'd have to apply the color manually in Flare, or take a screen shot of the code and use an image in Flare.
You'd have the same problem with any authoring tool. Not even Word would preserve the color of the SQL query, again, because it isn't inherent in the code itself.
If you were looking at the code on the Web, then you could copy and paste the code, preserving formatting, and then you would probably get the color.
You'd have the same problem with any authoring tool. Not even Word would preserve the color of the SQL query, again, because it isn't inherent in the code itself.
If you were looking at the code on the Web, then you could copy and paste the code, preserving formatting, and then you would probably get the color.
-
- Propellus Maximus
- Posts: 574
- Joined: Tue Oct 03, 2006 7:56 am
- Location: Seattle, WA
- Contact:
Re: colored syntax formatting
Thanks for the response, Paul. Yes, I suspected it was an editor thing, and not inherent to Flare. It would be cool if Flare added a feature to dynamically apply syntax color-coding to tagged content upon builds!
Pamela Denchfield
http://www.pameladenchfield.com
http://www.pameladenchfield.com
-
- Sr. Propeller Head
- Posts: 330
- Joined: Tue May 13, 2008 3:27 pm
- Location: Christchurch, New Zealand
Re: colored syntax formatting
Have a search for 3rd-party tools. One I found was http://tohtml.com/ - which will take your sample code and apply HTML styles to it. You could then paste the preview into the XML editor in Flare.
Cheers
Greg
Cheers
Greg