How does jsfiddle mark up code? Is there a library for this?

两盒软妹~` 提交于 2019-12-12 08:56:25

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!