What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 150 Stack Exchange communities.

I am very curious to know how to implement the Ctrl-K (code sample) feature against code.

For example:

public static void main(String args[]){        

Will that be nicely formatted?

  1. Do we require any package to implement this?
  2. Any ready made code available to do this?

I am planning to develop a site where this feature would be really helpful.

share|improve this question

migrated from stackoverflow.com Apr 27 '10 at 7:35

This question came from our site for professional and enthusiast programmers.

Why in the world did this get moved to meta? Sure--it's "about" Stack Overflow, but I'm kinda thinking that answers involving event handlers and cross-browser Javascript libraries belong exactly where the asker asked this, and not here... – sblom Apr 27 '10 at 14:05

1 Answer 1

I guest you are looking for Google Javascript code prettifier.

As rsp mentioned in comments it works for the following list of languages.

share|improve this answer
@Gierlik, does that work for all the languages – harigm Apr 23 '10 at 13:13
@harigm, look at the test page: google-code-prettify.googlecode.com/svn/trunk/tests/… – rsp Apr 23 '10 at 13:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .