CodeMirror is a
JavaScript
JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of websites use JavaScript on the client side for webpage behavior, of ...
component
Circuit Component may refer to:
•Are devices that perform functions when they are connected in a circuit.
In engineering, science, and technology Generic systems
* System components, an entity with discrete structure, such as an assem ...
that provides a
code editor
A source-code editor is a text editor program designed specifically for editing source code of computer programs. It may be a standalone application or it may be built into an integrated development environment (IDE) or web browser. Source-code ed ...
in the
browser. It has a rich programming
API
An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
and a focus on
extensibility.
History
The first version of the editor was written early 2007, for the console in the Eloquent JavaScript website. The code was first packaged up and released under the name CodeMirror in May 2007. This version was based on the
contentEditable
feature of browsers.
In late 2010, the
Ace
An ace is a playing card, die or domino with a single pip. In the standard French deck, an ace has a single suit symbol (a heart, diamond, spade, or club) located in the middle of the card, sometimes large and decorated, especially in the c ...
project, another JavaScript-based code editor, pioneered new implementation techniques and demonstrated that it is possible, even in JavaScript, to handle documents with many thousands of lines without degraded performance. This prompted a rewrite of CodeMirror
along the same principles. The result was version 2, which no longer relied on
contentEditable
and significantly improved performance.
See also
*
Comparison of JavaScript-based source code editors
References
External links
*
Blog series about CodeMirror internals
{{Web-software-stub
JavaScript libraries
JavaScript-based HTML editors
Software using the MIT license