Extensible Code Editor
CodeMirror 6 is a rewrite of
the CodeMirror code editor. It
greatly improves the library's accessibility and touchscreen support,
provides better content analysis and a modern programming interface.
The new system matches the existing code in features and performance.
It is not API-compatible with the old code.
The project is in the beta phase—there's a stable interface, but
small breaking changes might still happen. It is being used in
production in a few mid-size systems, but is not as battle-tested as
the old version.
This version of CodeMirror was designed from the start with
accessibility in mind, avoiding a number of pitfalls that the
current crop of editors suffer from.
Using a native editable control allows you to use the editor on
a phone or tablet with the platform's native selection and editing
A more structured extension interface allows you to implement
complicated extensions in a robust way, without the race
conditions and complexity they would involve in the old
The system's core is extremely generic, and even basic features
like syntax highlighting and line number gutters are implemented
as extensions, allowing you to omit or replace them if you need
The recommended way to write language integration for
CodeMirror 6 involves
a full parse tree,
which makes code analysis easier and more powerful.
By carefully doing only the work that needs to be done, the
library manages to be fast even with gigantic documents and
CodeMirror is open source
It is being developed
Contributions are welcome.
If you are using CodeMirror commercially, there is
a social expectation that you help fund its maintenance.
The library supports browsers up from Internet Explorer 11
(with some polyfills).
Discussing the project, or asking questions, is best done on
the forum. Bugs should
be reported through
tracker. 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.
There is also a collection
of CodeMirror 5
modes that can be used—if no full support is available for your
language, you may still find a highlighter in there.
These wonderful companies and organizations helped fund the work on CodeMirror 6.