CodeMirror is a versatile text editor implemented in JavaScript for the browser. 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.

## This is CodeMirror

<!-- Create a simple CodeMirror instance --> <link rel="stylesheet" href="lib/codemirror.css"> <script src="lib/codemirror.js"></script> <script> var editor = CodeMirror.fromTextArea(myTextarea, { mode: "text/html" }); </script>
DOWNLOAD LATEST RELEASE
version 4.0 (Release notes)
or use the minification helper
DONATE WITH PAYPAL
or Bank, Bitcoin, Gittip, Flattr
× Bank: Rabobank
Country: Netherlands
SWIFT: RABONL2U
Account: 147850770
Name: Marijn Haverbeke
IBAN: NL26 RABO 0147 8507 70
× Bitcoin address: 1HVnnU8E9yLPeFyNgNtUPB5deXBvUmZ6Nx
Purchase commercial support

## Features

- Support for over 60 languages out of the box
- A powerful, composable language mode system
- Autocompletion (XML)
- Code folding
- Configurable keybindings
- Vim, Emacs, and Sublime Text bindings
- 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. It is the editor used in the dev tools for both Firefox and Chrome, Light Table, Adobe Brackets, Bitbucket, and many other projects.

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 mailing list. There is also the codemirror-announce list, which is only used for major announcements (such as new versions). If needed, you can contact the maintainer directly.

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 `<!doctype html>` recommended) are supported:

Firefox | version 3 and up
Chrome | any version
Safari | version 5.2 and up
Internet Explorer | version 8 and up
Opera | version 9 and up

Modern mobile browsers tend to partly work. Bug reports and patches for mobile support are welcome, but the maintainer does not have the time or budget to actually work on it himself.