开发者

Open source browser based (i.e. javascript) highlighter for Python code?

开发者 https://www.devze.com 2023-01-19 10:48 出处:网络
I have an html page with a textarea in which users typ开发者_如何学Goe python code.I\'d like for the input python code to be highlighted as they type, much as a desktop-based IDE would do.

I have an html page with a textarea in which users typ开发者_如何学Goe python code. I'd like for the input python code to be highlighted as they type, much as a desktop-based IDE would do.

Unlike this question, I don't want the code to be passed to the server and returned highlighted - I'd like for it all to be done by javascript in the browser.

Rather than re-invent the wheel, is there an existing open source javascript library which would do this?


After a bit more googling, and to answer my own question - wikipedia has a comparison of javascript source code editors and CodeMirror seems to be a popular choice.


Check out Mozilla Bespin (now called Skywriter) https://mozillalabs.com/skywriter/

I'm fairly sure it highlights Python

0

精彩评论

暂无评论...
验证码 换一张
取 消