CodeMirror is a versatile text editor implemented in JavaScript for the browser. CodeMirror是一套在浏览器中用JavaScript实现的多功能的文本编辑器。It is specialized for editing code, and comes with a number of language modes and addons that implement more advanced editing functionality.它专用于编辑代码,配带了一些语言模式和实验高级编辑功能的附件
A rich programming API and a CSS theming system are available for customizing CodeMirror to fit your application, and extending it with new functionality.可用一套丰富的编程API和一些CSS主题系统,来自定义CodeMirror适应你的应用程序,并利用新功能来扩展它。
This is CodeMirror下面是CodeMirror
Features功能
Support for over 100 languages out of the box安装即支持超过一百多种语言A powerful, composable language mode system一套强大的、可复合的语言模式系统。Autocompletion自动补全 (XML)Code folding代码折叠Configurable可配置的keybindings键绑定Vim, Emacs, and Sublime Text bindingsVim、Emacs和Sublime Text绑定Search and replace搜索和替换interface接口Bracket and tag matching括号和标记匹配。Support for split views支持分割视图Linter integration高亮集成Mixing font sizes and styles混合字体和样式Various themes各种主题Able to能够resize to fit content改变大小以适应内容Inline and block widgets内联部件和块部件Programmable gutters可编程的沟槽Making ranges of text styled, read-only, or atomic确定被样式化、只读或原子化的文本范围Bi-directional text support双向文本支持Many other methods and addons...很多其它方法和附件……
相关资料
Community社群
CodeMirror is an open-source project shared under an MIT license. CodeMirror是一套开源项目,在MIT license下面共享。It is the editor used in the dev tools for Firefox, Chrome, and Safari, in Light Table, Adobe Brackets, Bitbucket, and many other projects.它一套编辑器,用于Firefox、Chrome、Safari中的开发工具, 用在Light Table、Adobe Brackets、Bitbucket和很多其它项目中。
Development and bug tracking happens on github (alternate git repository). Please read these pointers before submitting a bug. Use pull requests to submit patches. All contributions must be released under the same MIT license that CodeMirror uses.
Discussion around the project is done on a discussion forum. Announcements related to the project, such as new versions, are posted in the forum's "announce" category. If needed, you can contact the maintainer directly. We aim to be an inclusive, welcoming community. To make that explicit, we have a code of conduct that applies to communication around the project.
A list of CodeMirror-related software that is not part of the main distribution is maintained on our wiki. Feel free to add your project.
Browser support浏览器支持
The desktop versions of the following browsers, in standards mode (HTML5 以下浏览器的桌面版本,在标准模式中(建议使用HTML5<!doctype html>
recommended) are supported:<!doctype html>
)支持它:
Firefox | version 4 and up |
---|---|
Chrome | any version |
Safari | version 5.2 and up |
Internet Explorer/Edge | version 8 and up |
Opera | version 9 and up |
Support for modern mobile browsers is experimental. 对现代移动浏览器的支持是试验性的。Recent versions of the iOS browser and Chrome on Android should work pretty well.iOS浏览器的最新版本,以及安卓上的Chrome浏览器上它应该能工作得很好。