CodeMirror

An embeddable code editor written in JavaScript.

CodeMirror is a versatile text editor implemented in JavaScript for the browser. It is specialized for editing code, and comes with a number of language modes and addons that implement more advanced editing functionality.

Basic Code Editor

It has the ability to convert HTML textarea fields or other HTML elements to editor instances.

Themes

Select a theme:

Lazy Mode Loading

It has the ability to convert HTML textarea fields or other HTML elements to editor instances.

Current mode: text/plain

Filename, mime, or mode name:

Sublime Text bindings

Code Folding Demo

Selection Marking & Highlighter

HTML5 preview

Ruler & Visible tabs