2

Like there is a code sample inserter in the stackoverflow's WYSIWYG text editor (see image here)

I want such a formatter to show a code snippet in an html page with colored keywords and strings etc. Please help.

4 Answers 4

1

Check out google code prettify: http://code.google.com/p/google-code-prettify/

Sign up to request clarification or add additional context in comments.

1 Comment

This has always worked superbly for me (although it does rely on JavaScript if that is a concern to you).
1

Check http://code.google.com/p/syntaxhighlighter/ it's pretty popular and awesome.

Comments

0

This maybe? http://plugins.jquery.com/plugin-tags/syntax

Comments

0

Geshi is quite awesome too: http://qbnz.com/highlighter/demo.php

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.