CodeMirror is a
JavaScript
JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior.
Web browsers have ...
component
Component may refer to:
In engineering, science, and technology Generic systems
*System components, an entity with discrete structure, such as an assembly or software module, within a system considered at a particular level of analysis
* Lumped e ...
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).
Features
Source-code editor ...
in the
browser. It has a rich programming
API
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
and a focus on
extensibility
Extensibility is a software engineering and systems design principle that provides for future growth. Extensibility is a measure of the ability to extend a system and the level of effort required to implement the extension. Extensions can be t ...
.
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 a club) located in the middle of the card, sometimes large and decorated, especially in the ...
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.
Version 6 was released in 2022.
The library has been split into a collection of packages,
and core packages are released independently.
See also
*
Comparison of JavaScript-based source code editors
This article provides basic feature comparison between some of the JavaScript-based source code editors available today.
Overview
List of features
Feature testing was performed with Firefox 3.0.6 against the current demo version, and results m ...
References
External links
*
Blog series about CodeMirror internals
JavaScript libraries
JavaScript-based HTML editors
Software using the MIT license
{{Web-software-stub