How to insert code sample

This forum is for all Flare issues not related to any of the other categories.
Post Reply
somik1
Jr. Propeller Head
Posts: 1
Joined: Thu Oct 04, 2012 4:01 pm

How to insert code sample

Post by somik1 »

Hi,
Neither help nor forum told me the simplest way to insert a code sample. I needed to insert a sample of VB.NET code to preserve its formatting and highlighting. I found only this explanation http://kungfuwit.wordpress.com/2009/05/ ... o-a-topic/. Please review my steps of inserting the code and teach how to make this efficiently.

How to insert code sample:
  • Select the code and press Ctrl+C to copy it to the clipboard.
  • In a required place in your topic where you need to insert the code, place your cursor, click the Styles control on the Home ribbon and select the pre tag. The pre tag appears where you placed the cursor, and everything inserted here will be formatted with the selected tag.
  • Press Ctrl+V. See the code inserted with the Paste icon under it. The icon has the arrow on the right which opens the paste options.
  • Click the arrow and select Paste inline text from the list. Now you can see the code inserted into one pre tag.
Thanks.
NorthEast
Master Propellus Maximus
Posts: 6375
Joined: Mon Mar 05, 2007 8:33 am

Re: How to insert code sample

Post by NorthEast »

That should work, and preserve the formatting.

I'm not sure what 'highlighting' you want to preserve. Your application/editor might display the code with some highlighting, but the code is just plain text, so it won't contain any highlighting when you copy/paste.

If you want to apply highlighting to code (in HTML/web outputs) , use something like Google code prettify.
Post Reply