CodeMirror is a code editor component for the web. It can be used in websites to implement a text input field with support for many editing features and has a rich programming interface to allow further extension.
Main features include:
- Works well with screen readers and keyboard-only users.
- Use the platform's native selection and editing features on phones.
- Support mixing of right-to-left and left-to-right text.
- Color code to reflect syntactic structure.
- Display gutters with line numbers or other information next to the code.
- Provide language-specific completion hints in the editor.
- Temporarily hide parts of the document.
- Editor-specific search, regexp search, and replace functionality.
- Detailed parse trees allow many types of language integration.
- Robustly implement demanding editor extensions.
- Most features are implemented on top of a generic public API.
- Remains responsive even on huge documents and long lines.
- Automatically insert matching brackets during typing.
- Show error and warning messages in the editor.
- Mix font styles and sizes, add widgets in the content.
- Import or create custom visual editor styles.
- Allow multiple users to edit the same document.
- Undo and redo functionality with collab editing support.
- Select and edit multiple ranges of the document at once.
- Provide custom text to display or announce to the user.
- Find a full description of the library's features in the docs.
CodeMirror is open source under a permissive license (MIT) and is being developed on GitHub. Contributions are welcome.