How do I insert code in my posts?

Tags:

Inserting code in your posts is likely something that you'll want to do.  Fortunately, this isn't very hard to do.  First, start a new line and where it says --Format-- in your toolbar and select "Preformatted".  Then select your language from the --Styles-- dropdown. THen just start typing your code.  You'll end up with something like the following when you submit your post:

puts 'Hellooooo from Ruby' 

And that should get you what you want. 

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Venkateswara Ra... replied on Mon, 2008/02/11 - 12:03am

sdasd

 import java.io.*;
 

 

satheesh s replied on Mon, 2008/04/07 - 4:54am

How can  i create a java object in java scripts.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.