<!doctype html>

<title>CodeMirror</title>
<meta charset="utf-8"/>

<link rel=stylesheet href="lib/codemirror.css">
<link rel=stylesheet href="doc/docs.css">
<script src="lib/codemirror.js"></script>
<script src="mode/xml/xml.js"></script>
<script src="mode/javascript/javascript.js"></script>
<script src="mode/css/css.js"></script>
<script src="mode/htmlmixed/htmlmixed.js"></script>
<script src="addon/edit/matchbrackets.js"></script>

<script src="doc/activebookmark.js"></script>

<style>
  .CodeMirror { height: auto; border: 1px solid #ddd; }
  .CodeMirror-scroll { max-height: 200px; }
  .CodeMirror pre { padding-left: 7px; line-height: 1.25; }
  .banner { background: #ffc; padding: 6px; border-bottom: 2px solid silver;  }
  .banner div { margin: 0 auto; max-width: 700px; text-align: center; }
</style>

<div id=nav>
  <a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="doc/logo.png"></a>

  <ul>
    <li><a class=active data-default="true" href="#description">Home</a>
    <li><a href="doc/manual.html">Manual</a>
    <li><a href="https://github.com/codemirror/codemirror">Code</a>
    <li><a href="https://codemirror.net/6/">Version 6</a>
  </ul>
  <ul>
    <li><a href="#features">Features</a>
    <li><a href="#community">Community</a>
    <li><a href="#browsersupport">Browser support</a>
  </ul>
</div>

<article>

<section id=description class=first>
  <p><strong>CodeMirror</strong> is a versatile text editor
  implemented in JavaScript for the browser. It is specialized for
  editing code, and comes with a number of <a href="mode/index.html">language modes</a> and <a href="doc/manual.html#addons">addons</a>
  that implement more advanced editing functionality.</p>

  <p>A rich <a href="doc/manual.html#api">programming API</a> and a
  CSS <a href="doc/manual.html#styling">theming</a> system are
  available for customizing CodeMirror to fit your application, and
  extending it with new functionality.</p>
</section>

<section id=demo>
  <h2>This is CodeMirror</h2>
  <form style="position: relative; margin-top: .5em;"><textarea id=demotext>
<!-- Create a simple CodeMirror instance -->
<link rel="stylesheet" href="lib/codemirror.css">
<script src="lib/codemirror.js"></script>
<script>
  var editor = CodeMirror.fromTextArea(myTextarea, {
    lineNumbers: true
  });
</script></textarea>
  <select id="demolist" onchange="document.location = this.options[this.selectedIndex].value;">
    <option value="#">Other demos...</option>
    <option value="demo/complete.html">Autocompletion</option>
    <option value="demo/folding.html">Code folding</option>
    <option value="demo/theme.html">Themes</option>
    <option value="mode/htmlmixed/index.html">Mixed language modes</option>
    <option value="demo/bidi.html">Bi-directional text</option>
    <option value="demo/variableheight.html">Variable font sizes</option>
    <option value="demo/search.html">Search interface</option>
    <option value="demo/vim.html">Vim bindings</option>
    <option value="demo/emacs.html">Emacs bindings</option>
    <option value="demo/sublime.html">Sublime Text bindings</option>
    <option value="demo/tern.html">Tern integration</option>
    <option value="demo/merge.html">Merge/diff interface</option>
    <option value="demo/fullscreen.html">Full-screen editor</option>
    <option value="demo/simplescrollbars.html">Custom scrollbars</option>
  </select></form>
  <script>
    var editor = CodeMirror.fromTextArea(document.getElementById("demotext"), {
      lineNumbers: true,
      mode: "text/html",
      matchBrackets: true
    });
  </script>

  <div class=actions>
    <div class=actionspicture>
      <img src="doc/yinyang.png" class=yinyang>
      <div class="actionlink download">
        <a href="https://codemirror.net/codemirror.zip">DOWNLOAD</a>
      </div>
      <div class="actionlink fund">
        <a href="https://marijnhaverbeke.nl/fund/">FUND</a>
      </div>
    </div>
    <div class=actionsleft>
      Get the current version: <a href="https://codemirror.net/codemirror.zip">5.56.0</a>.<br>
      You can see the <a href="https://github.com/codemirror/codemirror" title="Github repository">code</a>,<br>
      read the <a href="doc/releases.html">release notes</a>,<br>
      or study the <a href="doc/manual.html">user manual</a>.
    </div>
    <div class=actionsright>
      Software needs maintenance,<br>
      maintainers need to subsist.<br>
      You can help <a href="https://marijnhaverbeke.nl/fund/" title="Set up a monthly contribution">per month</a> or
      <a title="Donate with PayPal" href="https://www.paypal.me/marijnhaverbeke">once</a>.
    </div>
  </div>

</section>

<section id=features>
  <h2>Features</h2>
  <ul>
    <li>Support for <a href="mode/index.html">over 100 languages</a> out of the box
    <li>A powerful, <a href="mode/htmlmixed/index.html">composable</a> language mode <a href="doc/manual.html#modeapi">system</a>
    <li><a href="doc/manual.html#addon_show-hint">Autocompletion</a> (<a href="demo/xmlcomplete.html">XML</a>)
    <li><a href="doc/manual.html#addon_foldcode">Code folding</a>
    <li><a href="doc/manual.html#option_extraKeys">Configurable</a> keybindings
    <li><a href="demo/vim.html">Vim</a>, <a href="demo/emacs.html">Emacs</a>, and <a href="demo/sublime.html">Sublime Text</a> bindings
    <li><a href="doc/manual.html#addon_search">Search and replace</a> interface
    <li><a href="doc/manual.html#addon_matchbrackets">Bracket</a> and <a href="doc/manual.html#addon_matchtags">tag</a> matching
    <li>Support for <a href="demo/buffers.html">split views</a>
    <li><a href="doc/manual.html#addon_lint">Linter integration</a>
    <li><a href="demo/variableheight.html">Mixing font sizes and styles</a>
    <li><a href="demo/theme.html">Various themes</a>
    <li>Able to <a href="demo/resize.html">resize to fit content</a>
    <li><a href="doc/manual.html#mark_replacedWith">Inline</a> and <a href="doc/manual.html#addLineWidget">block</a> widgets
    <li>Programmable <a href="demo/marker.html">gutters</a>
    <li>Making ranges of text <a href="doc/manual.html#markText">styled, read-only, or atomic</a>
    <li><a href="demo/bidi.html">Bi-directional text</a> support
    <li>Many other <a href="doc/manual.html#api">methods</a> and <a href="doc/manual.html#addons">addons</a>...
  </ul>
</section>

<section id=community>
  <h2>Community</h2>

  <p>CodeMirror is an open-source project shared under
  an <a href="LICENSE">MIT license</a>. It is the editor used in the
  dev tools for
  <a href="https://hacks.mozilla.org/2013/11/firefox-developer-tools-episode-27-edit-as-html-codemirror-more/">Firefox</a>,
  <a href="https://developers.google.com/chrome-developer-tools/">Chrome</a>,
  and <a href="https://developer.apple.com/safari/tools/">Safari</a>, in <a href="http://www.lighttable.com/">Light
  Table</a>, <a href="http://brackets.io/">Adobe
  Brackets</a>, <a href="http://blog.bitbucket.org/2013/05/14/edit-your-code-in-the-cloud-with-bitbucket/">Bitbucket</a>,
  and <a href="doc/realworld.html">many other projects</a>.</p>

  <p>Development and bug tracking happens
  on <a href="https://github.com/codemirror/CodeMirror/">github</a>
  (<a href="http://marijnhaverbeke.nl/git/codemirror">alternate git
  repository</a>).
  Please <a href="https://codemirror.net/doc/reporting.html">read these
  pointers</a> before submitting a bug. Use pull requests to submit
  patches. All contributions must be released under the same MIT
  license that CodeMirror uses.</p>

  <p>Discussion around the project is done on
  a <a href="https://discuss.codemirror.net">discussion forum</a>.
  Announcements related to the project, such as new versions, are
  posted in the
  forum's <a href="https://discuss.codemirror.net/c/announce">"announce"</a>
  category. If needed, you can
  contact <a href="mailto:marijnh@gmail.com">the maintainer</a>
  directly. We aim to be an inclusive, welcoming community. To make
  that explicit, we have
  a <a href="http://contributor-covenant.org/version/1/1/0/">code of
  conduct</a> that applies to communication around the project.</p>
</section>

<section id=browsersupport>
  <h2>Browser support</h2>
  <p>The <em>desktop</em> versions of the following browsers,
  in <em>standards mode</em> (HTML5 <code>&lt;!doctype html></code>
  recommended) are supported:</p>
  <table style="margin-bottom: 1em">
    <tr><th>Firefox</th><td>version 4 and up</td></tr>
    <tr><th>Chrome</th><td>any version</td></tr>
    <tr><th>Safari</th><td>version 5.2 and up</td></tr>
    <tr><th style="padding-right: 1em;">Internet Explorer/Edge</th><td>version 8 and up</td></tr>
    <tr><th>Opera</th><td>version 9 and up</td></tr>
  </table>
  <p>Support for modern mobile browsers is experimental. Recent
  versions of the iOS browser and Chrome on Android should work
  pretty well.</p>
</section>

<section id=sponsors>
  <style>
    ul.sponsor-list { padding-left: 10px }
    ul.sponsor-list li { list-style: none; margin-bottom: 1em }
    ul.sponsor-list img { max-width: 80%; max-height: 10em; width: 20em }
  </style>

  <h2>Sponsors</h2>
  <p>These companies support development of this project:</p>
  <ul class=sponsor-list>
    <li><a href="https://codepen.io/"><img src='data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 138 26"><path fill="none" stroke="black" stroke-width="2.3" stroke-linecap="round" stroke-linejoin="round" d="M15 8a7 7 0 100 10m7-8.7L33 2l11 7.3v7.4L33 24l-11-7.3zm0 0l11 7.4 11-7.4m0 7.4L33 9.3l-11 7.4M33 2v7.3m0 7.4V24M52 6h5a7 7 0 010 14h-5zm28 0h-9v14h9m-9-7h6m11 1h6a4 4 0 000-8h-6v14m26-14h-9v14h9m-9-7h6m11 7V6l11 14V6"/></svg>' alt="CodePen"></a></li>
    <li><a href="https://www.jetbrains.com/"><img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='39 0 142.7 119'%3E%3ClinearGradient id='SVGID_1_' gradientUnits='userSpaceOnUse' x1='4.7875' y1='6.8451' x2='75.7999' y2='54.4038'%3E%3Cstop offset='0' stop-color='%23AA4A9B'/%3E%3Cstop offset='1' stop-color='%23F05922'/%3E%3C/linearGradient%3E%3Cpath fill='url(%23SVGID_1_)' d='M81.3,57.6L18.7,3.1c-1.9-1.8-4.5-3-7.3-3.1C5.2-0.2,0.2,4.6,0,10.7c-0.1,4.3,2.3,8.1,5.8,10l70.4,43.7c0.1,0.1,0.2,0.1,0.3,0.2c2.1,1.1,4.6,0.4,5.8-1.6C83.4,61.2,82.9,58.9,81.3,57.6z'/%3E%3ClinearGradient id='SVGID_2_' gradientUnits='userSpaceOnUse' x1='28.3538' y1='119.6551' x2='139.5938' y2='60.2551'%3E%3Cstop offset='0' stop-color='%23FFE42E'/%3E%3Cstop offset='1' stop-color='%23ED417C'/%3E%3C/linearGradient%3E%3Cpath fill='url(%23SVGID_2_)' d='M142.7,66.3c-0.3-8.6-7.6-15.3-16.2-14.9c-2.7,0.1-5.3,0.9-7.5,2.2l-88,50.1c0,0-0.1,0-0.1,0.1c-3,1.2-5,4.2-4.9,7.6c0.2,4.4,3.8,7.8,8.2,7.6c1,0,2-0.3,2.9-0.7l95.9-37c0,0,0.1,0,0.2-0.1C138.9,78.8,142.9,73,142.7,66.3z'/%3E%3ClinearGradient id='SVGID_3_' gradientUnits='userSpaceOnUse' x1='31.6974' y1='114.3816' x2='72.0174' y2='55.3416'%3E%3Cstop offset='0' stop-color='%23FFE42E'/%3E%3Cstop offset='1' stop-color='%23F05922'/%3E%3C/linearGradient%3E%3Cpath fill='url(%23SVGID_3_)' d='M71.8,64c1.1-2.1,0.3-4.7-1.8-5.7c-1.9-1-4.2-0.4-5.4,1.3l-37.1,47.1c0,0,0,0.1-0.1,0.2c-1.8,2.7-1.8,6.3,0.3,9c2.6,3.5,7.5,4.2,11,1.7c1-0.8,1.8-1.8,2.4-2.8l30.5-50.2C71.6,64.3,71.7,64.1,71.8,64z'/%3E%3Crect x='45.5' y='35.7' width='51' height='51'/%3E%3Crect x='49.9' y='77.1' fill='%23fff' width='19.1' height='3.2'/%3E%3Cpath fill='%23fff' d='M49.7,49.1l1.5-1.4c0.4,0.5,0.8,0.8,1.3,0.8c0.6,0,0.9-0.4,0.9-1.2V42h2.3v5.3c0,1-0.3,1.8-0.8,2.3c-0.5,0.5-1.3,0.8-2.3,0.8C51.2,50.5,50.3,49.9,49.7,49.1z'/%3E%3Cpath fill='%23fff' d='M56.3,42h6.7V44h-4.4v1.3h4v1.8h-4v1.3H63v2h-6.7V42z'/%3E%3Cpath fill='%23fff' d='M66,44.1h-2.5v-2h7.3v2h-2.5v6.3H66V44.1z'/%3E%3Cpath fill='%23fff' d='M49.9,52.3h4.3c1,0,1.8,0.3,2.3,0.7c0.3,0.3,0.5,0.8,0.5,1.4v0c0,1-0.5,1.5-1.3,1.9c1,0.3,1.7,0.9,1.7,2v0c0,1.4-1.2,2.3-3.1,2.3h-4.3V52.3z M54.7,54.9c0-0.5-0.4-0.7-1-0.7h-1.5v1.5h1.4C54.3,55.6,54.7,55.4,54.7,54.9L54.7,54.9z M53.9,57.2h-1.8v1.5h1.8c0.7,0,1.1-0.3,1.1-0.8v0C55,57.5,54.7,57.2,53.9,57.2z'/%3E%3Cpath fill='%23fff' d='M57.7,52.3h3.9c1.3,0,2.2,0.3,2.7,0.9c0.5,0.5,0.7,1.1,0.7,1.9v0c0,1.3-0.7,2.1-1.7,2.6l2,2.9h-2.6L61,58.1h-1v2.5h-2.3V52.3z M61.5,56.3c0.8,0,1.2-0.4,1.2-1v0c0-0.7-0.5-1-1.2-1H60v2H61.5z'/%3E%3Cpath fill='%23fff' d='M67.8,52.2H70l3.5,8.4h-2.5l-0.6-1.5h-3.2l-0.6,1.5h-2.4L67.8,52.2z M69.8,57.3L68.9,55l-0.9,2.4H69.8z'/%3E%3Cpath fill='%23fff' d='M73.8,52.3h2.3v8.3h-2.3V52.3z'/%3E%3Cpath fill='%23fff' d='M76.7,52.3h2.2l3.4,4.4v-4.4h2.3v8.3h-2L79,56.1v4.6h-2.3V52.3z'/%3E%3Cpath fill='%23fff' d='M84.7,59.4l1.3-1.5c0.8,0.7,1.7,1,2.7,1c0.6,0,1-0.2,1-0.6v0c0-0.4-0.3-0.5-1.4-0.8c-1.8-0.4-3.1-0.9-3.1-2.6v0c0-1.5,1.2-2.7,3.2-2.7c1.4,0,2.5,0.4,3.4,1.1l-1.2,1.6c-0.8-0.5-1.6-0.8-2.3-0.8c-0.6,0-0.8,0.2-0.8,0.5v0c0,0.4,0.3,0.5,1.4,0.8c1.9,0.4,3.1,1,3.1,2.6v0c0,1.7-1.3,2.7-3.4,2.7C87.1,60.8,85.7,60.3,84.7,59.4z'/%3E%3C/svg%3E%0A" alt="JetBrains"></a>
  </ul>
</section>

</article>
