# { } CodeMirror

    /* In-browser code editing
       made bearable */

CodeMirror is a JavaScript library that can be used to create a relatively pleasant editor interface for code-like content ― computer programs, HTML markup, and similar. If a parser has been written for the language you are editing (see below for a list of supported languages), the code will be coloured, and the editor will help you with indentation.

## Try the parser test pages:

- JavaScript
- XML/HTML
- CSS
- HTML mixed-mode
- SPARQL
- HTML+PHP mixed-mode
- Python
- Lua
- Ruby (unfinished)
- SQL
- PLSQL
- diff
- Groovy
- C#
- Scheme
- Java
- XQuery
- OmetaJS
- Freemarker
- Regular Expressions

## Some real-world uses:

- Google Code's in-browser patching
- Interactive environment for the Move language
- Google Earth KML sampler
- Eloquent JavaScript's console
- The qooxdoo playground
- A cool tutorial about the <canvas> element
- An online IDE for the Orc programming language
- Google's API playground
- Raphaël Live
- JS Bin
- The RokPad plugin for Joomla
- The scraperwiki editor
- jsLinb UI Builder
- ZK CodeMirror component (demo)
- 'Zen Coding' on top of CodeMirror
- Web-based MySQL administration

## Supported browsers

The following browsers are able to run CodeMirror:

- Firefox 1.5 or higher
- Internet Explorer 6 or higher
- Safari 3 or higher
- Opera 9.52 or higher
- Chrome

I am not actively testing against every new browser release, and vendors have a habit of introducing bugs all the time, so I am relying on the community to tell me when something breaks. See below for information on how to contact me.

## Getting the code

All of CodeMirror is released under a zlib-style license. To get it, you can download the latest release or the current development snapshot as zip files. To create a custom minified script file, you can use the compression API.

We use git for version control. The main repository can be fetched in this way:

    git clone http://marijnhaverbeke.nl/git/codemirror

CodeMirror can also be found on GitHub: http://github.com/marijnh/CodeMirror. If you plan to hack on the code and contribute patches, the best way to do it is to create a GitHub fork, and send pull requests.

## Documentation

The manual is your first stop for learning how to use this library. It starts with a quick explanation of how to use the editor, and then describes all of the (many) options and methods that CodeMirror exposes.

For those who want to learn more about the code, this document about CodeMirror's architecture will be useful. The source code itself is, for the most part, also very well commented.

## Support

There is a Google group (a sort of mailing list/newsgroup thing) for discussion and news related to CodeMirror. Please check the FAQ before asking a question. You can also e-mail me directly: Marijn Haverbeke.

Current project page

This is the old CodeMirror 1 project page. For new releases and events, see CodeMirror 2.