问题
If you've ever used www.jsfiddle.net, you might notice that it marks up code with proper colorings, and various other helpers like translating tabs to four spaces or shift-tab. With Firebug I see that it's doing this with an iFrame. Is there an open source library to do this? I want to let people write Python on a web page, but make it pretty like jsfiddle.
回答1:
Check out CodeMirror.
回答2:
Look here (SyntaxHighlighter)
Here you can find a simple tutorial.
来源:https://stackoverflow.com/questions/4301347/how-does-jsfiddle-mark-up-code-is-there-a-library-for-this