index.html 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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. </style>
  18. <div id=nav>
  19. <a href="http://codemirror.net"><img id=logo src="doc/logo.png"></a>
  20. <ul>
  21. <li><a class=active data-default="true" href="#description">Home</a>
  22. <li><a href="doc/manual.html">Manual</a>
  23. <li><a href="https://github.com/marijnh/codemirror">Code</a>
  24. </ul>
  25. <ul>
  26. <li><a href="#features">Features</a>
  27. <li><a href="#community">Community</a>
  28. <li><a href="#browsersupport">Browser support</a>
  29. </ul>
  30. </div>
  31. <article>
  32. <section id=description class=first>
  33. <p><strong>CodeMirror</strong> is a versatile text editor
  34. implemented in JavaScript for the browser. It is specialized for
  35. editing code, and comes with a number of language modes and addons
  36. that implement more advanced editing functionality.</p>
  37. <p>A rich <a href="doc/manual.html#api">programming API</a> and a
  38. CSS <a href="doc/manual.html#styling">theming</a> system are
  39. available for customizing CodeMirror to fit your application, and
  40. extending it with new functionality.</p>
  41. </section>
  42. <section id=demo>
  43. <h2>This is CodeMirror</h2>
  44. <form style="position: relative; margin-top: .5em;"><textarea id=demotext>
  45. <!-- Create a simple CodeMirror instance -->
  46. <link rel="stylesheet" href="lib/codemirror.css">
  47. <script src="lib/codemirror.js"></script>
  48. <script>
  49. var editor = CodeMirror.fromTextArea(myTextarea, {
  50. mode: "text/html"
  51. });
  52. </script></textarea>
  53. <select id="demolist" onchange="document.location = this.options[this.selectedIndex].value;">
  54. <option value="#">Other demos...</option>
  55. <option value="demo/complete.html">Autocompletion</option>
  56. <option value="demo/folding.html">Code folding</option>
  57. <option value="demo/theme.html">Themes</option>
  58. <option value="mode/htmlmixed/index.html">Mixed language modes</option>
  59. <option value="demo/bidi.html">Bi-directional text</option>
  60. <option value="demo/variableheight.html">Variable font sizes</option>
  61. <option value="demo/search.html">Search interface</option>
  62. <option value="demo/vim.html">Vim bindings</option>
  63. <option value="demo/emacs.html">Emacs bindings</option>
  64. <option value="demo/sublime.html">Sublime Text bindings</option>
  65. <option value="demo/tern.html">Tern integration</option>
  66. <option value="demo/merge.html">Merge/diff interface</option>
  67. <option value="demo/fullscreen.html">Full-screen editor</option>
  68. </select></form>
  69. <script>
  70. var editor = CodeMirror.fromTextArea(document.getElementById("demotext"), {
  71. lineNumbers: true,
  72. mode: "text/html",
  73. matchBrackets: true
  74. });
  75. </script>
  76. <div style="position: relative; margin: 1em 0;">
  77. <a class="bigbutton left" href="http://codemirror.net/codemirror.zip">DOWNLOAD LATEST RELEASE</a>
  78. <div><strong>version 4.6</strong> (<a href="doc/releases.html">Release notes</a>)</div>
  79. <div>or use the <a href="doc/compress.html">minification helper</a></div>
  80. <div style="position: absolute; top: 0; right: 0; text-align: right">
  81. <span class="bigbutton right" onclick="document.getElementById('paypal').submit();">DONATE WITH PAYPAL</span>
  82. <div style="position: relative">
  83. or <span onclick="document.getElementById('bankinfo').style.display = 'block';" class=quasilink>Bank</span>,
  84. <span onclick="document.getElementById('bcinfo').style.display = 'block';" class=quasilink>Bitcoin</span>,
  85. <a href="https://www.gittip.com/marijnh">Gittip</a>,
  86. <a href="https://flattr.com/profile/marijnh">Flattr</a><br>
  87. <div id=bankinfo class=bankinfo>
  88. <span class=bankinfo_close onclick="document.getElementById('bankinfo').style.display = '';">×</span>
  89. Bank: <i>Rabobank</i><br/>
  90. Country: <i>Netherlands</i><br/>
  91. SWIFT: <i>RABONL2U</i><br/>
  92. Account: <i>147850770</i><br/>
  93. Name: <i>Marijn Haverbeke</i><br/>
  94. IBAN: <i>NL26 RABO 0147 8507 70</i>
  95. </div>
  96. <div id=bcinfo class=bankinfo>
  97. <span class=bankinfo_close onclick="document.getElementById('bcinfo').style.display = '';">×</span>
  98. Bitcoin address: 1HVnnU8E9yLPeFyNgNtUPB5deXBvUmZ6Nx
  99. </div>
  100. <form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="paypal">
  101. <input type="hidden" name="cmd" value="_s-xclick"/>
  102. <input type="hidden" name="hosted_button_id" value="3FVHS5FGUY7CC"/>
  103. </form>
  104. </div>
  105. <div>
  106. Purchase <a href="http://codemirror.com">commercial support</a>
  107. </div>
  108. </div>
  109. </div>
  110. </section>
  111. <section id=features>
  112. <h2>Features</h2>
  113. <ul>
  114. <li>Support for <a href="mode/index.html">over 60 languages</a> out of the box
  115. <li>A powerful, <a href="mode/htmlmixed/index.html">composable</a> language mode <a href="doc/manual.html#modeapi">system</a>
  116. <li><a href="doc/manual.html#addon_show-hint">Autocompletion</a> (<a href="demo/xmlcomplete.html">XML</a>)
  117. <li><a href="doc/manual.html#addon_foldcode">Code folding</a>
  118. <li><a href="doc/manual.html#option_extraKeys">Configurable</a> keybindings
  119. <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
  120. <li><a href="doc/manual.html#addon_search">Search and replace</a> interface
  121. <li><a href="doc/manual.html#addon_matchbrackets">Bracket</a> and <a href="doc/manual.html#addon_matchtags">tag</a> matching
  122. <li>Support for <a href="demo/buffers.html">split views</a>
  123. <li><a href="doc/manual.html#addon_lint">Linter integration</a>
  124. <li><a href="demo/variableheight.html">Mixing font sizes and styles</a>
  125. <li><a href="demo/theme.html">Various themes</a>
  126. <li>Able to <a href="demo/resize.html">resize to fit content</a>
  127. <li><a href="doc/manual.html#mark_replacedWith">Inline</a> and <a href="doc/manual.html#addLineWidget">block</a> widgets
  128. <li>Programmable <a href="demo/marker.html">gutters</a>
  129. <li>Making ranges of text <a href="doc/manual.html#markText">styled, read-only, or atomic</a>
  130. <li><a href="demo/bidi.html">Bi-directional text</a> support
  131. <li>Many other <a href="doc/manual.html#api">methods</a> and <a href="doc/manual.html#addons">addons</a>...
  132. </ul>
  133. </section>
  134. <section id=community>
  135. <h2>Community</h2>
  136. <p>CodeMirror is an open-source project shared under
  137. an <a href="LICENSE">MIT license</a>. It is the editor used in the
  138. dev tools for
  139. both <a href="https://hacks.mozilla.org/2013/11/firefox-developer-tools-episode-27-edit-as-html-codemirror-more/">Firefox</a>
  140. and <a href="https://developers.google.com/chrome-developer-tools/">Chrome</a>, <a href="http://www.lighttable.com/">Light
  141. Table</a>, <a href="http://brackets.io/">Adobe
  142. Brackets</a>, <a href="http://blog.bitbucket.org/2013/05/14/edit-your-code-in-the-cloud-with-bitbucket/">Bitbucket</a>,
  143. and <a href="doc/realworld.html">many other projects</a>.</p>
  144. <p>Development and bug tracking happens
  145. on <a href="https://github.com/marijnh/CodeMirror/">github</a>
  146. (<a href="http://marijnhaverbeke.nl/git/codemirror">alternate git
  147. repository</a>).
  148. Please <a href="http://codemirror.net/doc/reporting.html">read these
  149. pointers</a> before submitting a bug. Use pull requests to submit
  150. patches. All contributions must be released under the same MIT
  151. license that CodeMirror uses.</p>
  152. <p>Discussion around the project is done on
  153. a <a href="http://groups.google.com/group/codemirror">mailing list</a>.
  154. There is also
  155. the <a href="http://groups.google.com/group/codemirror-announce">codemirror-announce</a>
  156. list, which is only used for major announcements (such as new
  157. versions). If needed, you can
  158. contact <a href="mailto:marijnh@gmail.com">the maintainer</a>
  159. directly.</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/marijnh/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</th><td>version 8 and up</td></tr>
  175. <tr><th>Opera</th><td>version 9 and up</td></tr>
  176. </table>
  177. <p>Modern mobile browsers tend to partly work. Bug reports and
  178. patches for mobile support are welcome, but the maintainer does not
  179. have the time or budget to actually work on it himself.</p>
  180. </section>
  181. </article>