Python 代码的基于开源浏览器(即 javascript)的荧光笔?
我有一个带有文本区域的 html 页面,用户可以在其中输入 python 代码。我希望输入的 python 代码在键入时突出显示,就像基于桌面的 IDE 所做的那样。
与这个问题不同,我不希望代码通过到服务器并返回突出显示 - 我希望这一切都由浏览器中的 javascript 完成。
与其重新发明轮子,是否有一个现有的开源 JavaScript 库可以做到这一点?
I have an html page with a textarea in which users type 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
经过更多的谷歌搜索,并回答我自己的问题 - 维基百科有一个 javascript 源代码编辑器的比较< /a> 和 CodeMirror 似乎是一个流行的选择。
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.
查看 Mozilla Bespin(现称为 Skywriter)https://mozillalabs.com/skywriter/
我相当确定它突出了Python
Check out Mozilla Bespin (now called Skywriter) https://mozillalabs.com/skywriter/
I'm fairly sure it highlights Python