Showing a code snippet in an HTML page

2019-07-19 13:23发布

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条回答
Animai°情兽
2楼-- · 2019-07-19 13:52

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

查看更多
Rolldiameter
3楼-- · 2019-07-19 14:05

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

查看更多
再贱就再见
5楼-- · 2019-07-19 14:10
登录 后发表回答