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.
Features
-
Accessible
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.
-
Touchscreen Support
Using a native editable control allows you to use the editor on
a phone or tablet with the platform's native selection and editing
behavior.
-
Extensible
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
system.
-
Modular
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
to.
-
Full Parsing
The recommended way to write language integration for
CodeMirror 6 involves
a full parse tree,
which makes code analysis easier and more powerful.
-
Fast
By carefully doing only the work that needs to be done, the
library manages to be fast even with gigantic documents and
long lines.
About
CodeMirror is open source
(MIT
or GPL3).
It is being developed
on GitHub.
Contributions are welcome.
If you are using CodeMirror commercially, there is
a social expectation that you help fund its maintenance.
Start here.
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
the issue
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.
Language Support
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.