index.html 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  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; }
  18. .banner div { margin: 0 auto; max-width: 700px; text-align: center; }
  19. </style>
  20. <div class=banner><div>
  21. CodeMirror is evolving! Check out our <a href="https://codemirror.net/6/">announcement</a> about the upcoming redesigned, accessible, mobile-friendly version.
  22. </div></div>
  23. <div id=nav>
  24. <a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="doc/logo.png"></a>
  25. <ul>
  26. <li><a class=active data-default="true" href="#description">Home</a>
  27. <li><a href="doc/manual.html">Manual</a>
  28. <li><a href="https://github.com/codemirror/codemirror">Code</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.40.2</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. Current funding status = <img src="https://marijnhaverbeke.nl/fund/status_s.png" title="Current maintainer happiness" style="vertical-align: middle; height: 16px; width: 16px"><br>
  102. You can help <a href="https://marijnhaverbeke.nl/fund/" title="Set up a monthly contribution">per month</a> or
  103. <a title="Donate with PayPal" href="https://www.paypal.me/marijnhaverbeke">once</a>.
  104. </div>
  105. </div>
  106. </section>
  107. <section id=features>
  108. <h2>Features</h2>
  109. <ul>
  110. <li>Support for <a href="mode/index.html">over 100 languages</a> out of the box
  111. <li>A powerful, <a href="mode/htmlmixed/index.html">composable</a> language mode <a href="doc/manual.html#modeapi">system</a>
  112. <li><a href="doc/manual.html#addon_show-hint">Autocompletion</a> (<a href="demo/xmlcomplete.html">XML</a>)
  113. <li><a href="doc/manual.html#addon_foldcode">Code folding</a>
  114. <li><a href="doc/manual.html#option_extraKeys">Configurable</a> keybindings
  115. <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
  116. <li><a href="doc/manual.html#addon_search">Search and replace</a> interface
  117. <li><a href="doc/manual.html#addon_matchbrackets">Bracket</a> and <a href="doc/manual.html#addon_matchtags">tag</a> matching
  118. <li>Support for <a href="demo/buffers.html">split views</a>
  119. <li><a href="doc/manual.html#addon_lint">Linter integration</a>
  120. <li><a href="demo/variableheight.html">Mixing font sizes and styles</a>
  121. <li><a href="demo/theme.html">Various themes</a>
  122. <li>Able to <a href="demo/resize.html">resize to fit content</a>
  123. <li><a href="doc/manual.html#mark_replacedWith">Inline</a> and <a href="doc/manual.html#addLineWidget">block</a> widgets
  124. <li>Programmable <a href="demo/marker.html">gutters</a>
  125. <li>Making ranges of text <a href="doc/manual.html#markText">styled, read-only, or atomic</a>
  126. <li><a href="demo/bidi.html">Bi-directional text</a> support
  127. <li>Many other <a href="doc/manual.html#api">methods</a> and <a href="doc/manual.html#addons">addons</a>...
  128. </ul>
  129. </section>
  130. <section id=community>
  131. <h2>Community</h2>
  132. <p>CodeMirror is an open-source project shared under
  133. an <a href="LICENSE">MIT license</a>. It is the editor used in the
  134. dev tools for
  135. <a href="https://hacks.mozilla.org/2013/11/firefox-developer-tools-episode-27-edit-as-html-codemirror-more/">Firefox</a>,
  136. <a href="https://developers.google.com/chrome-developer-tools/">Chrome</a>,
  137. and <a href="https://developer.apple.com/safari/tools/">Safari</a>, in <a href="http://www.lighttable.com/">Light
  138. Table</a>, <a href="http://brackets.io/">Adobe
  139. Brackets</a>, <a href="http://blog.bitbucket.org/2013/05/14/edit-your-code-in-the-cloud-with-bitbucket/">Bitbucket</a>,
  140. and <a href="doc/realworld.html">many other projects</a>.</p>
  141. <p>Development and bug tracking happens
  142. on <a href="https://github.com/codemirror/CodeMirror/">github</a>
  143. (<a href="http://marijnhaverbeke.nl/git/codemirror">alternate git
  144. repository</a>).
  145. Please <a href="https://codemirror.net/doc/reporting.html">read these
  146. pointers</a> before submitting a bug. Use pull requests to submit
  147. patches. All contributions must be released under the same MIT
  148. license that CodeMirror uses.</p>
  149. <p>Discussion around the project is done on
  150. a <a href="https://discuss.codemirror.net">discussion forum</a>.
  151. Announcements related to the project, such as new versions, are
  152. posted in the
  153. forum's <a href="https://discuss.codemirror.net/c/announce">"announce"</a>
  154. category. If needed, you can
  155. contact <a href="mailto:marijnh@gmail.com">the maintainer</a>
  156. directly. We aim to be an inclusive, welcoming community. To make
  157. that explicit, we have
  158. a <a href="http://contributor-covenant.org/version/1/1/0/">code of
  159. conduct</a> that applies to communication around the project.</p>
  160. <p>A list of CodeMirror-related software that is not part of the
  161. main distribution is maintained
  162. on <a href="https://github.com/codemirror/CodeMirror/wiki/CodeMirror-addons">our
  163. wiki</a>. Feel free to add your project.</p>
  164. </section>
  165. <section id=browsersupport>
  166. <h2>Browser support</h2>
  167. <p>The <em>desktop</em> versions of the following browsers,
  168. in <em>standards mode</em> (HTML5 <code>&lt;!doctype html></code>
  169. recommended) are supported:</p>
  170. <table style="margin-bottom: 1em">
  171. <tr><th>Firefox</th><td>version 4 and up</td></tr>
  172. <tr><th>Chrome</th><td>any version</td></tr>
  173. <tr><th>Safari</th><td>version 5.2 and up</td></tr>
  174. <tr><th style="padding-right: 1em;">Internet Explorer/Edge</th><td>version 8 and up</td></tr>
  175. <tr><th>Opera</th><td>version 9 and up</td></tr>
  176. </table>
  177. <p>Support for modern mobile browsers is experimental. Recent
  178. versions of the iOS browser and Chrome on Android should work
  179. pretty well.</p>
  180. </section>
  181. </article>