index.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <!doctype html>
  2. <title>CodeMirror</title>
  3. <meta charset="utf-8"/>
  4. <link rel=stylesheet href="lib/codemirror.css">
  5. <link rel=stylesheet href="doc/docs.css">
  6. <script src="lib/codemirror.js"></script>
  7. <script src="mode/xml/xml.js"></script>
  8. <script src="mode/javascript/javascript.js"></script>
  9. <script src="mode/css/css.js"></script>
  10. <script src="mode/htmlmixed/htmlmixed.js"></script>
  11. <script src="addon/edit/matchbrackets.js"></script>
  12. <script src="doc/activebookmark.js"></script>
  13. <style>
  14. .CodeMirror { height: auto; border: 1px solid #ddd; }
  15. .CodeMirror-scroll { max-height: 200px; }
  16. .CodeMirror pre { padding-left: 7px; line-height: 1.25; }
  17. .banner { background: #ffc; padding: 6px; border-bottom: 2px solid silver; text-align: center }
  18. </style>
  19. <div class=banner>
  20. ‼️ Check out the upcoming <a href="https://codemirror.net/6/">CodeMirror 6</a>, a much-improved rewrite! ✨
  21. </div>
  22. <div id=nav>
  23. <a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="doc/logo.png"></a>
  24. <ul>
  25. <li><a class=active data-default="true" href="#description">Home</a>
  26. <li><a href="doc/manual.html">Manual</a>
  27. <li><a href="https://github.com/codemirror/codemirror">Code</a>
  28. <li><a href="https://codemirror.net/6/">Version 6</a>
  29. </ul>
  30. <ul>
  31. <li><a href="#features">Features</a>
  32. <li><a href="#community">Community</a>
  33. <li><a href="#browsersupport">Browser support</a>
  34. </ul>
  35. </div>
  36. <article>
  37. <section id=description class=first>
  38. <p><strong>CodeMirror</strong> is a versatile text editor
  39. implemented in JavaScript for the browser. It is specialized for
  40. 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>
  41. that implement more advanced editing functionality.</p>
  42. <p>A rich <a href="doc/manual.html#api">programming API</a> and a
  43. CSS <a href="doc/manual.html#styling">theming</a> system are
  44. available for customizing CodeMirror to fit your application, and
  45. extending it with new functionality.</p>
  46. </section>
  47. <section id=demo>
  48. <h2>This is CodeMirror</h2>
  49. <form style="position: relative; margin-top: .5em;"><textarea id=demotext>
  50. <!-- Create a simple CodeMirror instance -->
  51. <link rel="stylesheet" href="lib/codemirror.css">
  52. <script src="lib/codemirror.js"></script>
  53. <script>
  54. var editor = CodeMirror.fromTextArea(myTextarea, {
  55. lineNumbers: true
  56. });
  57. </script></textarea>
  58. <select id="demolist" onchange="document.location = this.options[this.selectedIndex].value;">
  59. <option value="#">Other demos...</option>
  60. <option value="demo/complete.html">Autocompletion</option>
  61. <option value="demo/folding.html">Code folding</option>
  62. <option value="demo/theme.html">Themes</option>
  63. <option value="mode/htmlmixed/index.html">Mixed language modes</option>
  64. <option value="demo/bidi.html">Bi-directional text</option>
  65. <option value="demo/variableheight.html">Variable font sizes</option>
  66. <option value="demo/search.html">Search interface</option>
  67. <option value="demo/vim.html">Vim bindings</option>
  68. <option value="demo/emacs.html">Emacs bindings</option>
  69. <option value="demo/sublime.html">Sublime Text bindings</option>
  70. <option value="demo/tern.html">Tern integration</option>
  71. <option value="demo/merge.html">Merge/diff interface</option>
  72. <option value="demo/fullscreen.html">Full-screen editor</option>
  73. <option value="demo/simplescrollbars.html">Custom scrollbars</option>
  74. </select></form>
  75. <script>
  76. var editor = CodeMirror.fromTextArea(document.getElementById("demotext"), {
  77. lineNumbers: true,
  78. mode: "text/html",
  79. matchBrackets: true
  80. });
  81. </script>
  82. <div class=actions>
  83. <div class=actionspicture>
  84. <img src="doc/yinyang.png" class=yinyang>
  85. <div class="actionlink download">
  86. <a href="https://codemirror.net/codemirror.zip">DOWNLOAD</a>
  87. </div>
  88. <div class="actionlink fund">
  89. <a href="https://marijnhaverbeke.nl/fund/">FUND</a>
  90. </div>
  91. </div>
  92. <div class=actionsleft>
  93. Get the current version: <a href="https://codemirror.net/codemirror.zip">5.65.1</a>.<br>
  94. You can see the <a href="https://github.com/codemirror/codemirror" title="GitHub repository">code</a>,<br>
  95. read the <a href="doc/releases.html">release notes</a>,<br>
  96. or study the <a href="doc/manual.html">user manual</a>.
  97. </div>
  98. <div class=actionsright>
  99. Software needs maintenance,<br>
  100. maintainers need to subsist.<br>
  101. You can help <a href="https://marijnhaverbeke.nl/fund/" title="Set up a monthly contribution">per month</a> or
  102. <a title="Donate with PayPal" href="https://www.paypal.me/marijnhaverbeke">once</a>.
  103. </div>
  104. </div>
  105. </section>
  106. <section id=features>
  107. <h2>Features</h2>
  108. <ul>
  109. <li>Support for <a href="mode/index.html">over 100 languages</a> out of the box
  110. <li>A powerful, <a href="mode/htmlmixed/index.html">composable</a> language mode <a href="doc/manual.html#modeapi">system</a>
  111. <li><a href="doc/manual.html#addon_show-hint">Autocompletion</a> (<a href="demo/xmlcomplete.html">XML</a>)
  112. <li><a href="doc/manual.html#addon_foldcode">Code folding</a>
  113. <li><a href="doc/manual.html#option_extraKeys">Configurable</a> keybindings
  114. <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
  115. <li><a href="doc/manual.html#addon_search">Search and replace</a> interface
  116. <li><a href="doc/manual.html#addon_matchbrackets">Bracket</a> and <a href="doc/manual.html#addon_matchtags">tag</a> matching
  117. <li>Support for <a href="demo/buffers.html">split views</a>
  118. <li><a href="doc/manual.html#addon_lint">Linter integration</a>
  119. <li><a href="demo/variableheight.html">Mixing font sizes and styles</a>
  120. <li><a href="demo/theme.html">Various themes</a>
  121. <li>Able to <a href="demo/resize.html">resize to fit content</a>
  122. <li><a href="doc/manual.html#mark_replacedWith">Inline</a> and <a href="doc/manual.html#addLineWidget">block</a> widgets
  123. <li>Programmable <a href="demo/marker.html">gutters</a>
  124. <li>Making ranges of text <a href="doc/manual.html#markText">styled, read-only, or atomic</a>
  125. <li><a href="demo/bidi.html">Bi-directional text</a> support
  126. <li>Many other <a href="doc/manual.html#api">methods</a> and <a href="doc/manual.html#addons">addons</a>...
  127. </ul>
  128. </section>
  129. <section id=community>
  130. <h2>Community</h2>
  131. <p>CodeMirror is an open-source project shared under
  132. an <a href="LICENSE">MIT license</a>. It is the editor used in the
  133. dev tools for
  134. <a href="https://hacks.mozilla.org/2013/11/firefox-developer-tools-episode-27-edit-as-html-codemirror-more/">Firefox</a>,
  135. <a href="https://developers.google.com/chrome-developer-tools/">Chrome</a>,
  136. and <a href="https://developer.apple.com/safari/tools/">Safari</a>, in <a href="http://www.lighttable.com/">Light
  137. Table</a>, <a href="http://brackets.io/">Adobe
  138. Brackets</a>, <a href="http://blog.bitbucket.org/2013/05/14/edit-your-code-in-the-cloud-with-bitbucket/">Bitbucket</a>,
  139. and <a href="doc/realworld.html">many other projects</a>.</p>
  140. <p>Development and bug tracking happens
  141. on <a href="https://github.com/codemirror/CodeMirror/">github</a>
  142. (<a href="http://marijnhaverbeke.nl/git/codemirror">alternate git
  143. repository</a>).
  144. Please <a href="https://codemirror.net/doc/reporting.html">read these
  145. pointers</a> before submitting a bug. Use pull requests to submit
  146. patches. All contributions must be released under the same MIT
  147. license that CodeMirror uses.</p>
  148. <p>Discussion around the project is done on
  149. a <a href="https://discuss.codemirror.net">discussion forum</a>.
  150. Announcements related to the project, such as new versions, are
  151. posted in the
  152. forum's <a href="https://discuss.codemirror.net/c/announce">"announce"</a>
  153. category. If needed, you can
  154. contact <a href="mailto:marijnh@gmail.com">the maintainer</a>
  155. directly. We aim to be an inclusive, welcoming community. To make
  156. that explicit, we have
  157. a <a href="http://contributor-covenant.org/version/1/1/0/">code of
  158. conduct</a> that applies to communication around the project.</p>
  159. </section>
  160. <section id=browsersupport>
  161. <h2>Browser support</h2>
  162. <p>The <em>desktop</em> versions of the following browsers,
  163. in <em>standards mode</em> (HTML5 <code>&lt;!doctype html></code>
  164. recommended) are supported:</p>
  165. <table style="margin-bottom: 1em">
  166. <tr><th>Firefox</th><td>version 4 and up</td></tr>
  167. <tr><th>Chrome</th><td>any version</td></tr>
  168. <tr><th>Safari</th><td>version 5.2 and up</td></tr>
  169. <tr><th style="padding-right: 1em;">Internet Explorer/Edge</th><td>version 8 and up</td></tr>
  170. <tr><th>Opera</th><td>version 9 and up</td></tr>
  171. </table>
  172. <p>Support for modern mobile browsers is experimental. Recent
  173. versions of the iOS browser and Chrome on Android should work
  174. pretty well.</p>
  175. </section>
  176. <section id=sponsors>
  177. <style>
  178. ul.sponsor-list { padding-left: 10px; font-size: 200%; }
  179. ul.sponsor-list a { color: black; text-decoration: none }
  180. ul.sponsor-list li { list-style: none; margin-bottom: 16px }
  181. ul.sponsor-list img { max-width: 80%; max-height: 160px; width: 320px }
  182. ul.sponsor-list img.captioned { vertical-align: middle; width: 80px; max-width: 40%; height: auto; margin-right: 16px }
  183. </style>
  184. <h2>Sponsors</h2>
  185. <p>These companies support development of this project:</p>
  186. <ul class=sponsor-list>
  187. <li><a href="http://observablehq.com/"><img alt="Observable" src='doc/logos/observable.svg' loading=lazy></a></li>
  188. <li><a href="https://holmusk.com"><img class=captioned alt="" src='doc/logos/holmusk.svg' loading=lazy>Holmusk</a></li>
  189. <li><a href="https://codepen.io/"><img style="margin: 16px 0" src='doc/logos/codepen.svg' loading=lazy alt="CodePen"></a></li>
  190. <li><a href="https://4me.com"><img style="width: auto" src='doc/logos/4me.svg' loading=lazy alt="4me"></a></li>
  191. <li><a href="https://www.jetbrains.com/"><img src="doc/logos/jetbrains.svg" loading=lazy alt="JetBrains"></a>
  192. <li><a href="https://www.desmos.com/"><img src='doc/logos/desmos.svg' loading=lazy alt=desmos></a></li>
  193. <li><a href="https://www.executeprogram.com"><img style="background: #003; margin: 10px 0; padding: 10px 30px 10px 20px" src='doc/logos/executeprogram.svg' loading=lazy alt="Execute Program"></a></li>
  194. <li><a href="https://cargo.site"><img alt=Cargo style="max-height: 120px" src='doc/logos/cargo.svg' loading=lazy></a></li>
  195. <li><a href="https://primo.af"><img alt=primo src='doc/logos/primo.svg' loading=lazy></a></li>
  196. <li><a href="https://www.artcompiler.com"><img class=captioned alt="" src='doc/logos/artcompiler.svg' loading=lazy> ARTCOMPILER</a></li>
  197. <li><a href="https://www.prisma.io"><img alt="Prisma" src='doc/logos/prisma.svg' loading=lazy></a>
  198. <li><a href="https://anvil.works/"><img alt="Anvil" src='doc/logos/anvil.png' loading=lazy></a>
  199. </ul>
  200. </section>
  201. </article>