In association with heise online

28 December 2012, 10:57

JavaScript-based CodeMirror editor reaches version 3.0

  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

CodeMirror logo The developers of the CodeMirror, the JavaScript component for editing code in the browser, have released version 3.0 of the editor. The MIT licensed editor component can be embedded in any JavaScript enabled page and has been put to work in applications such as Adobe's Brackets editor, CoDev, Light Table and various online playgrounds for SQL, Haxe, JavaScript and WebGL. The 3.0 update is the result of four months work and although the API is similar to the 2.0 version there are a number of incompatibilities detailed in the upgrade guide; most importantly, 3.0 drops support for Internet Explorer 7.

In terms of visual features, the editor is now able to use arbitrary fonts and line heights and properly handles right-to-left scripts. There's also support for multiple gutters which no longer scroll horizontally with the content. The editor also allows widgets to be placed between lines or replace arbitrary pieces of content, which should allow for richer editing functionality. Ranges of text can now marked as read-only or atomic so that the cursor skips over them as if it were a single element. More modular event handling and an improved add-on API make CodeMirror 3.0 more amenable to embedding and extending.

CodeMirror can handle code highlighting modes for languages such as C, C++, C#, Java, Perl, PHP, JavaScript, Python, Lua, Go, Groovy and Ruby and other files including diff, properties files, LaTeX, SQL, wiki and Markdown. It supports autocompletion, search/replace, HTML preview, line, selection and search highlighting, visible tabs, emacs and vim keybindings and code autoformatting. CodeMirror 3.0 is available for downloadDirect download and on GitHub.

The next version of CodeMirror is now in development. CodeMirror 3.1 will overhaul the first-class document handling which will allow documents to be created without editors and for the editor to switch the currently showing documents.


Print Version | Send by email | Permalink:

  • July's Community Calendar

The H Open

The H Security

The H Developer

The H Internet Toolkit