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[]){
System.out.println.out("welcome");
}
That will be nicely formatted?
- Do we require any package to implement this?
- Any ready made code available to do this?
Can any one help me with this? I am planning to develop a site where this feature would be a real helpful.
I guess you are looking for Google Javascript code prettifier.
As rsp mentioned in comments it works for following list of languages.