admin管理员组

文章数量:1406052

Where can I find a simple JavaScript based HTML syntax highlighter?
Simpler is better, and I don't need any line numbers or tricks, just added colors.

If it is the same colors as dreamweaver, even better!

Where can I find a simple JavaScript based HTML syntax highlighter?
Simpler is better, and I don't need any line numbers or tricks, just added colors.

If it is the same colors as dreamweaver, even better!

Share Improve this question edited Nov 5, 2009 at 14:41 GEOCHET 21.3k15 gold badges77 silver badges99 bronze badges asked Nov 5, 2009 at 12:52 Timo HuovinenTimo Huovinen 55.8k34 gold badges160 silver badges149 bronze badges
Add a ment  | 

4 Answers 4

Reset to default 5

There's also google's prettify.js, which is the syntax highligher used on this site:

http://code.google./p/google-code-prettify/

Here are some :

  • SHJS
  • highlight.js
  • Prettify (As suggested by Joel)
  • SyntaxHighlighter (Ok this one is more fancy, but i already used it and it work well)

You can also try prism.js. I have used many of them and this is by far the simplest one according to me.

If you are using Dojo a nice one is dojox.highlight extension.

Demo page is here.

本文标签: Where can I find a simple JavaScript based HTML syntax highlighterStack Overflow