forked from codemirror/CodeMirror-v1
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
245 lines (214 loc) · 11.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CodeMirror: In-browser code editing</title>
<link rel="stylesheet" type="text/css" href="css/docs.css"/>
<style type="text/css">
div.top {text-align: center;}
div.top h1 {margin-bottom: 0;}
div.top h2 {margin-top: 0; margin-bottom: 1.5em;}
div.donate span {cursor: pointer; text-decoration: underline;}
div.donate {font-size: 70%; margin-top: 1em; width: 155px; padding: 10px; border: 1px solid #c44;}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body>
<div class="top">
<h1>CodeMirror</h1>
<h2 class="underline">In-browser code editing made almost bearable</h2>
</div>
<div style="float: right; padding-left: 10px;">
<img src="css/people.jpg" alt=""/><br/>
<div class="donate">
Make a donation:
<ul style="margin: 0 2em; padding: 0">
<li><span onclick="document.getElementById('paypal').submit();">Paypal</span></li>
<li><span onclick="document.getElementById('bankinfo').style.display = 'block';">Bank</span></li>
</ul>
<div id="bankinfo" style="display: none; font-size: 80%;">
Bank: <i>Rabobank</i><br/>
Country: <i>Netherlands</i><br/>
SWIFT: <i>RABONL2U</i><br/>
Account: <i>147850770</i><br/>
Name: <i>Marijn Haverbeke</i><br/>
IBAN: <i>NL26 RABO 0147 8507 70</i>
</div>
</div>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="paypal">
<input type="hidden" name="cmd" value="_s-xclick"/>
<input type="hidden" name="hosted_button_id" value="3FVHS5FGUY7CC"/>
</form>
</div>
<p>CodeMirror is a JavaScript library that can be used to create a
relatively pleasant editor interface for code-like content ―
computer programs, HTML markup, and similar. If a parser has been
written for the language you are editing (see below for a list of
supported languages), the code will be coloured, and the editor will
help you with indentation.</p>
<p>To get a look at CodeMirror, see the test pages for the various
parsers...</p>
<ul>
<li><a href="jstest.html">JavaScript</a></li>
<li><a href="htmltest.html">XML/HTML</a></li>
<li><a href="csstest.html">CSS</a></li>
<li><a href="sparqltest.html">SPARQL</a></li>
<li><a href="mixedtest.html">HTML mixed-mode</a></li>
<li><a href="contrib/php/index.html">HTML+PHP mixed-mode</a> (courtesy of <a href="contrib/php/LICENSE">Yahoo!</a>)</li>
<li><a href="contrib/python/index.html">Python</a> (by <a href="contrib/python/LICENSE">Timothy Farrell</a>)</li>
<li><a href="contrib/lua/index.html">Lua</a> (by <a href="http://francio.pl/">Franciszek Wawrzak</a>)</li>
<li><a href="http://github.com/hakunin/ruby-in-codemirror/tree/master">Ruby</a> (by Michal Hantl, unfinished)</li>
<li><a href="contrib/sql/index.html">SQL</a> (by John Benediktsson)</li>
<li><a href="contrib/plsql/index.html">PLSQL</a> (by <a href="http://www.oracle-and-apex.com/">Peter Raganitsch</a>)</li>
<li><a href="http://www.liranuna.com/diff-parser-for-codemirror/">diff</a> (courtesy of <a href="http://www.liranuna.com">Liran Nuna</a>)</li>
<li><a href="contrib/groovy/index.html">Groovy</a> (by <a href="http://exoplatform.org/">eXo Platform</a>)</li>
<li><a href="contrib/csharp/index.html">C#</a> (by <a href="http://skilltesting.com/">Boris Gaber and Christopher Buchino</a>)</li>
<li><a href="contrib/ometa/index.html">OmetaJS</a> (by <a href="http://erickedji.wordpress.com/">Eric KEDJI</a>)</li>
<li><a href="contrib/scheme/index.html">Scheme</a> (by <a href="http://hashcollision.org/">Danny Yoo</a>)</li>
</ul>
<p>Or take a look at some real-world uses of the system...</p>
<ul>
<li><a href="http://kml-samples.googlecode.com/svn/trunk/interactive/index.html">Google Earth KML sampler</a></li>
<li><a href="http://eloquentjavascript.net/chapter1.html">Eloquent JavaScript's console</a></li>
<li><a href="http://demo.qooxdoo.org/current/playground/#Hello_World">The qooxdoo playground</a></li>
<li><a href="http://billmill.org/static/canvastutorial/index.html">A cool tutorial about the <canvas> element</a></li>
<li><a href="http://orc.csres.utexas.edu/tryorc.shtml">An online IDE for the Orc programming language</a></li>
<li><a href="http://code.google.com/apis/ajax/playground">Google's API playground</a></li>
<li><a href="http://craic.com/tutorials/javascript/raphael_live/raphael_live.html">Raphaël Live</a></li>
<li><a href="http://jsbin.com/">JS Bin</a></li>
<li><a href="http://www.rockettheme.com/extensions-joomla/rokpad">The RokPad plugin for Joomla</a></li>
<li><a href="http://scraperwiki.com/editor/">The scraperwiki editor</a></li>
<li><a href="http://www.linb.net/VisualJS/UIBuilder.html">jsLinb UI Builder</a></li>
</ul>
<h2>Releases</h2>
<p class="rel"><em>22-07-2010</em>: <a
href="http://codemirror.net/codemirror-0.8.zip">Version
0.8</a>:</p>
<ul class="rel">
<li>Add a <code>cursorCoords</code> method to find the screen
coordinates of the cursor.</li>
<li>A number of fixes and support for more syntax in the PHP parser.</li>
<li>Fix indentation problem with JSON-mode JS parser in Webkit.</li>
<li>Add a <a href="compress.html">minification</a> UI.</li>
<li>Support a <code>height: dynamic</code> mode, where the editor's
height will adjust to the size of its content.</li>
<li>Better support for IME input mode.</li>
<li>Fix JavaScript parser getting confused when seeing a no-argument
function call.</li>
<li>Have CSS parser see the difference between selectors and other
identifiers.</li>
<li>Fix scrolling bug when pasting in a horizontally-scrolled
editor.</li>
<li>Support <code>toTextArea</code> method in instances created with
<code>fromTextArea</code>.</li>
<li>Work around new Opera cursor bug that causes the cursor to jump
when pressing backspace at the end of a line.</li>
</ul>
<p class="rel"><em>21-06-2010</em>: <a
href="http://codemirror.net/codemirror/codemirror-0.7.zip">Version
0.7</a>:</p>
<ul class="rel">
<li>Fixes issue where calling <code>.submit()</code> on a form with
a <code>fromTextArea</code> CodeMirror failed to submit the
edited content.</li>
<li>Add <a href="contrib/groovy/index.html">Groovy</a> parser (hosted externally).</li>
<li>Make line-numbering much, much faster.</li>
<li>Fix occasional buggy behaviour of the enter key in Opera.</li>
<li>Add a <a href="faq.html">FAQ</a> document.</li>
<li>Make search use do-what-I-mean Emacs-like behaviour to determine
case-sensitivitiy is not explicitly specified.</li>
<li>Add a C# parser contrib module.</li>
<li>A number of bugfixes and extensions to the PHP parser (lambdas,
abstract classes, configurable opening tags).</li>
<li>Fix multiline comments in the Lua parser.</li>
</ul>
<p class="rel"><em>27-04-2010</em>: <a
href="http://codemirror.net/codemirror-0.67.zip">Version
0.67</a>: More consistent page-up/page-down behaviour across browsers.
Fix some issues with hidden editors looping forever when line-numbers
were enabled. Make PHP parser parse <code>"\\"</code> correctly. Have
<code>jumpToLine</code> work on line handles, and add
<code>cursorLine</code> function to fetch the line handle where the
cursor currently is. Add new <code>setStylesheet</code> function to
switch style-sheets in a running editor.</p>
<p class="rel"><em>01-03-2010</em>: <a
href="http://codemirror.net/codemirror-0.66.zip">Version
0.66</a>: Adds <code>removeLine</code> method to API. Introduces the
<a href="contrib/plsql/index.html">PLSQL parser</a>. Marks XML errors
by adding (rather than replacing) a CSS class, so that they can be
disabled by modifying their style. Fixes several selection bugs, and a
number of small glitches.</p>
<p class="rel"><em>12-11-2009</em>: <a
href="http://codemirror.net/codemirror-0.65.zip">Version
0.65</a>: Add support for having both line-wrapping and line-numbers
turned on, make paren-highlighting style customisable
(<code>markParen</code> and <code>unmarkParen</code> config options),
work around a selection bug that Opera <em>re</em>introduced in
version 10.</p>
<p class="rel"><em>23-10-2009</em>: <a
href="http://codemirror.net/codemirror-0.64.zip">Version
0.64</a>: Solves some issues introduced by the paste-handling changes
from the previous release. Adds <code>setSpellcheck</code>,
<code>setTextWrapping</code>, <code>setIndentUnit</code>,
<code>setUndoDepth</code>, <code>setTabMode</code>, and
<code>setLineNumbers</code> to customise a running editor. Introduces
an <a href="contrib/sql/index.html">SQL</a> parser. Fixes a few small
problems in the <a href="contrib/python/index.html">Python</a> parser.
And, as usual, add workarounds for various newly discovered browser
incompatibilities.</p>
<p class="rel"><em>31-08-2009</em>: <a
href="http://codemirror.net/codemirror-0.63.zip">Version
0.63</a>: Overhaul of paste-handling (less fragile), fixes for several
serious IE8 issues (cursor jumping, end-of-document bugs) and a number
of small problems.</p>
<p class="rel"><em>30-05-2009</em>: <a
href="http://codemirror.net/codemirror-0.62.zip">Version
0.62</a>: Introduces <a href="contrib/python/index.html">Python</a>
and <a href="contrib/lua/index.html">Lua</a> parsers. Add
<code>setParser</code> (on-the-fly mode changing) and
<code>clearHistory</code> methods. Make parsing passes time-based
instead of lines-based (see the <code>passTime</code> option).</p>
<h2 id="supported">Supported browsers</h2>
<p>At this time, the following browsers are supported:</p>
<ul>
<li>Firefox 1.5 or higher</li>
<li>Internet Explorer 6 or higher</li>
<li>Safari 3 or higher</li>
<li>Opera 9.52 or higher</li>
<li>Chrome</li>
</ul>
<p>Making it work on other browsers that have decent support for the
W3C DOM model should not be too hard, but I am not actively testing
against those.</p>
<h2>Getting the code</h2>
<p>All of CodeMirror is released under a <a
href="LICENSE">zlib-style</a> license. To get it, you can download the
<a href="http://codemirror.net/codemirror.zip">latest
release</a> or the current <a
href="http://codemirror.net/codemirror-latest.zip">development
snapshot</a> as zip files, try the <a href="compress.html">compression
API</a> to create a compressed version, or use <a
href="http://git-scm.com/">git</a> to get the repository:</p>
<pre class="code">git clone http://marijn.haverbeke.nl/git/codemirror</pre>
<p>This second method is recommended if you are planning to hack on
CodeMirror ― it makes it easy to record your patches and share
them with me. CodeMirror can also be found on GitHub: <a
href="http://github.com/marijnh/CodeMirror">http://github.com/marijnh/CodeMirror</a>.</p>
<h2>Support</h2>
<p>There is a <a
href="http://groups.google.com/group/codemirror">Google group</a> (a
sort of mailing list/newsgroup thingy) for discussion and news related
to CodeMirror. Please check the <a href="faq.html">FAQ</a> before
asking a questoin. You can also e-mail me directly: <a
href="mailto:[email protected]">Marijn Haverbeke</a>.</p>
<h2>Documentation</h2>
<ul>
<li>The <a href="manual.html">manual</a> is all most users will need
to read (or skim).</li>
<li>If you're interested in working on the code, <a
href="story.html">this document</a> about CodeMirror's architecture
will be useful.</li>
<li>The <a href="http://github.com/marijnh/CodeMirror">source
code</a> is, for the most part, rather well commented, so if all
else fails, you can try reading it.</li>
</ul>
</body>
</html>