diff --git a/README.md b/README.md index 3f1b1cc8d41c9d32bd0985352a54b44f60f915fe..09e6760fba40d3a33c228e5676e4f0b89e0904ff 100644 --- a/README.md +++ b/README.md @@ -2,5 +2,5 @@ CodeMirror 2 is a rewrite of [CodeMirror 1](http://github.com/marijnh/CodeMirror). The docs live -[here](http://codemirror.net/manual.html), and the project page is +[here](http://codemirror.net/doc/manual.html), and the project page is [http://codemirror.net/](http://codemirror.net/). diff --git a/demo/runmode.html b/demo/runmode.html index 5567b2ead61e84f9c19af6276e79ca1fbc76699f..d6ee17ec072bcef4848e6096b94e17745fcf3542 100644 --- a/demo/runmode.html +++ b/demo/runmode.html @@ -34,7 +34,7 @@ function doHighlight() { <dl> <dt><code>text (string)</code></dt> <dd>The document to run through the highlighter.</dd> - <dt><code>mode (<a href="../manual.html#option_mode">mode spec</a>)</code></dt> + <dt><code>mode (<a href="../doc/manual.html#option_mode">mode spec</a>)</code></dt> <dd>The mode to use (must be loaded as normal).</dd> <dt><code>output (function or DOM node)</code></dt> <dd>If this is a function, it will be called for each token with diff --git a/compress.html b/doc/compress.html similarity index 98% rename from compress.html rename to doc/compress.html index e0a2b30d7813dccd9f9253a07275d16f98b583d8..55f92ce1bbb4ad67a00d56fe87b45fa4daa23c6e 100644 --- a/compress.html +++ b/doc/compress.html @@ -3,7 +3,7 @@ <head> <title>CodeMirror: Compression Helper</title> <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans:bold"/> - <link rel="stylesheet" type="text/css" href="doc/docs.css"/> + <link rel="stylesheet" type="text/css" href="docs.css"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> </head> <body> @@ -11,7 +11,7 @@ <h1><span class="logo-braces">{ }</span> <a href="http://codemirror.net/">CodeMirror</a></h1> <pre class="grey"> -<img src="doc/baboon.png" class="logo" alt="logo"/>/* Script compression +<img src="baboon.png" class="logo" alt="logo"/>/* Script compression helper */ </pre> diff --git a/internals.html b/doc/internals.html similarity index 99% rename from internals.html rename to doc/internals.html index 7c7703c0a2b16abaddf5423593f0d402f1fc8857..338c9bb78d8fc967b1538571d9c6df7805e9208f 100644 --- a/internals.html +++ b/doc/internals.html @@ -3,7 +3,7 @@ <head> <title>CodeMirror: Internals</title> <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans:bold"/> - <link rel="stylesheet" type="text/css" href="doc/docs.css"/> + <link rel="stylesheet" type="text/css" href="docs.css"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <style>dl dl {margin: 0;} .update {color: #d40 !important}</style> </head> @@ -12,7 +12,7 @@ <h1><span class="logo-braces">{ }</span> <a href="http://codemirror.net/">CodeMirror</a></h1> <pre class="grey"> -<img src="doc/baboon.png" class="logo" alt="logo"/>/* (Re-) Implementing A Syntax- +<img src="baboon.png" class="logo" alt="logo"/>/* (Re-) Implementing A Syntax- Highlighting Editor in JavaScript */ </pre> @@ -341,7 +341,7 @@ from your document.</li> really known for respecting document flow. Now that an editor instance is a plain <code>div</code> element, it is much easier to size it to fit the surrounding elements. You don't even have to make it scroll if -you do not <a href="demo/resize.html">want to</a>.</li> +you do not <a href="../demo/resize.html">want to</a>.</li> </ul> diff --git a/manual.html b/doc/manual.html similarity index 96% rename from manual.html rename to doc/manual.html index 809f2ca63dc4237c8a29b5225fa7f753ef7fe053..bdcb4677cec29d4efb0b8bac7e475566fc3e6d04 100644 --- a/manual.html +++ b/doc/manual.html @@ -3,7 +3,7 @@ <head> <title>CodeMirror: User Manual</title> <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans:bold"/> - <link rel="stylesheet" type="text/css" href="doc/docs.css"/> + <link rel="stylesheet" type="text/css" href="docs.css"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <style>dl dl {margin: 0;}</style> </head> @@ -12,7 +12,7 @@ <h1><span class="logo-braces">{ }</span> <a href="http://codemirror.net/">CodeMirror</a></h1> <pre class="grey"> -<img src="doc/baboon.png" class="logo" alt="logo"/>/* User manual and +<img src="baboon.png" class="logo" alt="logo"/>/* User manual and reference guide */ </pre> @@ -46,7 +46,7 @@ example:</p> <pre><script src="lib/codemirror.js"></script> -<link rel="stylesheet" href="lib/codemirror.css"> +<link rel="stylesheet" href="../lib/codemirror.css"> <script src="mode/javascript/javascript.js"></script></pre> <p>Having done this, an editor instance can be created like @@ -130,7 +130,7 @@ <dd>The theme to style the editor with. You must make sure the CSS file defining the corresponding <code>.cm-s-[name]</code> styles is loaded (see - the <a href="theme/"><code>theme</code></a> directory in the + the <a href="../theme/"><code>theme</code></a> directory in the distribution). The default is <code>"default"</code>, for which colors are included in <code>codemirror.css</code>. It is possible to use multiple theming classes at once—for @@ -159,7 +159,7 @@ <dd>Configures the keymap to use. The default is <code>"default"</code>, which is the only keymap defined in <code>codemirror.js</code> itself. Extra keymaps are found in - the <a href="keymap/"><code>keymap</code></a> directory.</dd> + the <a href="../keymap/"><code>keymap</code></a> directory.</dd> <dt id="option_extraKeys"><code>extraKeys (object)</code></dt> <dd>Can be used to specify extra keybindings for the editor. @@ -296,7 +296,7 @@ simply provide the colors for that mode, and can be adapted in a very straightforward way. To style the editor itself, it is possible to alter or override the styles defined - in <a href="lib/codemirror.css"><code>codemirror.css</code></a>.</p> + in <a href="../lib/codemirror.css"><code>codemirror.css</code></a>.</p> <p>Some care must be taken there, since a lot of the rules in this file are necessary to have CodeMirror function properly. Adjusting @@ -370,7 +370,7 @@ <p>Themes are also simply CSS files, which define colors for various syntactic elements. See the files in - the <a href="theme/"><code>theme</code></a> directory.</p> + the <a href="../theme/"><code>theme</code></a> directory.</p> <h2 id="api">Programming API</h2> @@ -655,14 +655,14 @@ editor functionality. In brief, they are:</p> <dl> - <dt id="util_dialog"><a href="lib/util/dialog.js"><code>dialog.js</code></a></dt> + <dt id="util_dialog"><a href="../lib/util/dialog.js"><code>dialog.js</code></a></dt> <dd>Provides a very simple way to query users for text input. Adds an <code>openDialog</code> method to CodeMirror instances, which can be called with an HTML fragment that provides the prompt (should include an <code>input</code> tag), and a callback function that is called when text has been entered. Depends on <code>lib/util/dialog.css</code>.</dd> - <dt id="util_searchcursor"><a href="lib/util/searchcursor.js"><code>searchcursor.js</code></a></dt> + <dt id="util_searchcursor"><a href="../lib/util/searchcursor.js"><code>searchcursor.js</code></a></dt> <dd>Adds the <code>getSearchCursor(query, start, caseFold) → cursor</code> method to CodeMirror instances, which can be used to implement search/replace functionality. <code>query</code> @@ -691,15 +691,15 @@ replacement.</dd> </dl></dd> - <dt id="util_search"><a href="lib/util/search.js"><code>search.js</code></a></dt> + <dt id="util_search"><a href="../lib/util/search.js"><code>search.js</code></a></dt> <dd>Implements the search commands. CodeMirror has keys bound to these by default, but will not do anything with them unless an implementation is provided. Depends on <code>searchcursor.js</code>, and will make use of <a href="#util_dialog"><code>openDialog</code></a> when available to make prompting for search queries less ugly.</dd> - <dt id="util_foldcode"><a href="lib/util/foldcode.js"><code>foldcode.js</code></a></dt> - <dd>Helps with code folding. See <a href="demo/folding.html">the + <dt id="util_foldcode"><a href="../lib/util/foldcode.js"><code>foldcode.js</code></a></dt> + <dd>Helps with code folding. See <a href="../demo/folding.html">the demo</a> for an example. Call <code>CodeMirror.newFoldFunction</code> with a range-finder helper function to create a function that will, when applied to @@ -710,12 +710,12 @@ no block is started on that line. This file provides <code>CodeMirror.braceRangeFinder</code>, which finds blocks in brace languages (JavaScript, C, Java, etc).</dd> - <dt id="util_runmode"><a href="lib/util/runmode.js"><code>runmode.js</code></a></dt> + <dt id="util_runmode"><a href="../lib/util/runmode.js"><code>runmode.js</code></a></dt> <dd>Can be used to run a CodeMirror mode over text without actually opening an editor instance. - See <a href="demo/runmode.html">the demo</a> for an + See <a href="../demo/runmode.html">the demo</a> for an example.</dd> - <dt id="util_simple-hint"><a href="lib/util/simple-hint.js"><code>simple-hint.js</code></a></dt> + <dt id="util_simple-hint"><a href="../lib/util/simple-hint.js"><code>simple-hint.js</code></a></dt> <dd>Provides a framework for showing autocompletion hints. Defines <code>CodeMirror.simpleHint</code>, which takes a CodeMirror instance and a hinting function, and pops up a widget @@ -726,7 +726,7 @@ and <code>to</code> give the start and end of the token that is being completed. Depends on <code>lib/util/simple-hint.css</code>.</dd> - <dt id="util_javascript-hint"><a href="lib/util/javascript-hint.js"><code>javascript-hint.js</code></a></dt> + <dt id="util_javascript-hint"><a href="../lib/util/javascript-hint.js"><code>javascript-hint.js</code></a></dt> <dd>Defines <code>CodeMirror.javaScriptHint</code>, which is a simple hinting function for the JavaScript mode.</dd> </dl> @@ -909,13 +909,13 @@ provide <code>startState</code>, <code>copyState</code>, <code>compareStates</code>, and <code>indent</code> methods. For an example of a trivial mode, see - the <a href="mode/diff/diff.js">diff mode</a>, for a more involved - example, see the <a href="mode/clike/clike.js">C-like + the <a href="../mode/diff/diff.js">diff mode</a>, for a more involved + example, see the <a href="../mode/clike/clike.js">C-like mode</a>.</p> <p>Sometimes, it is useful for modes to <em>nest</em>—to have one mode delegate work to another mode. An example of this kind of - mode is the <a href="mode/htmlmixed/htmlmixed.js">mixed-mode HTML + mode is the <a href="../mode/htmlmixed/htmlmixed.js">mixed-mode HTML mode</a>. To implement such nesting, it is usually necessary to create mode objects and copy states yourself. To create a mode object, there are <code>CodeMirror.getMode(options, diff --git a/oldrelease.html b/doc/oldrelease.html similarity index 94% rename from oldrelease.html rename to doc/oldrelease.html index 80bbcde081bf6b4123c6db546ad33fd2c707516d..8f99f73c03b005265827ec7bde8acbeaef5d0efb 100644 --- a/oldrelease.html +++ b/doc/oldrelease.html @@ -3,7 +3,7 @@ <head> <title>CodeMirror</title> <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans:bold"/> - <link rel="stylesheet" type="text/css" href="doc/docs.css"/> + <link rel="stylesheet" type="text/css" href="docs.css"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <link rel="alternate" href="http://twitter.com/statuses/user_timeline/242283288.rss" type="application/rss+xml"/> </head> @@ -12,15 +12,15 @@ <h1><span class="logo-braces">{ }</span> <a href="http://codemirror.net/">CodeMirror</a></h1> <pre class="grey"> -<img src="doc/baboon.png" class="logo" alt="logo"/>/* Old release history */ +<img src="baboon.png" class="logo" alt="logo"/>/* Old release history */ </pre> <p class="rel">26-05-2011: <a href="http://codemirror.net/codemirror-2.01.zip">Version 2.01</a>:</p> <ul class="rel-note"> - <li>Add a <a href="mode/smalltalk/index.html">Smalltalk mode</a>.</li> - <li>Add a <a href="mode/rst/index.html">reStructuredText mode</a>.</li> - <li>Add a <a href="mode/python/index.html">Python mode</a>.</li> - <li>Add a <a href="mode/plsql/index.html">PL/SQL mode</a>.</li> + <li>Add a <a href="../mode/smalltalk/index.html">Smalltalk mode</a>.</li> + <li>Add a <a href="../mode/rst/index.html">reStructuredText mode</a>.</li> + <li>Add a <a href="../mode/python/index.html">Python mode</a>.</li> + <li>Add a <a href="../mode/plsql/index.html">PL/SQL mode</a>.</li> <li><code>coordsChar</code> now works</li> <li>Fix a problem where <code>onCursorActivity</code> interfered with <code>onChange</code>.</li> <li>Fix a number of scrolling and mouse-click-position glitches.</li> @@ -57,7 +57,7 @@ <li>Disabling spell-check on WebKit browsers now works.</li> </ul> - <p class="rel">08-02-2011: <a href="http://codemirror.net/2/">Version 2.0 beta 1</a>:</p> + <p class="rel">08-02-2011: <a href="http://codemirror.net/">Version 2.0 beta 1</a>:</p> <p class="rel-note">CodeMirror 2 is a complete rewrite of CodeMirror, no longer depending on an editable frame.</p> diff --git a/doc/reporting.html b/doc/reporting.html index 357f940d04cc415a4a70af36244b77a5521e6c52..915fa5234c4739f2eefa39ecf77929f06e5b33ce 100644 --- a/doc/reporting.html +++ b/doc/reporting.html @@ -3,7 +3,7 @@ <head> <title>CodeMirror: Reporting Bugs</title> <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans:bold"/> - <link rel="stylesheet" type="text/css" href="../doc/docs.css"/> + <link rel="stylesheet" type="text/css" href="docs.css"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <style>li { margin-top: 1em; }</style> </head> @@ -12,7 +12,7 @@ <h1><span class="logo-braces">{ }</span> <a href="http://codemirror.net/">CodeMirror</a></h1> <pre class="grey"> -<img src="../doc/baboon.png" class="logo" alt="logo"/>/* Reporting bugs +<img src="baboon.png" class="logo" alt="logo"/>/* Reporting bugs effectively */ </pre> diff --git a/doc/upgrade_v2.2.html b/doc/upgrade_v2.2.html index f024f49f66e051305f6fef58076729aa2ce05c61..c34e513829bf2fb03e9616c8b05781acebf9d466 100644 --- a/doc/upgrade_v2.2.html +++ b/doc/upgrade_v2.2.html @@ -3,7 +3,7 @@ <head> <title>CodeMirror: Upgrading to v2.2</title> <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans:bold"/> - <link rel="stylesheet" type="text/css" href="../doc/docs.css"/> + <link rel="stylesheet" type="text/css" href="docs.css"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> </head> <body> @@ -11,7 +11,7 @@ <h1><span class="logo-braces">{ }</span> <a href="http://codemirror.net/">CodeMirror</a></h1> <pre class="grey"> -<img src="../doc/baboon.png" class="logo" alt="logo"/>/* Upgrading to v2.2 +<img src="baboon.png" class="logo" alt="logo"/>/* Upgrading to v2.2 */ </pre> @@ -31,7 +31,7 @@ even if you're not using it, the extra data overhead is negligible.) <h2>Different key customization</h2> <p>CodeMirror has moved to a system -where <a href="../manual.html#option_keyMap">keymaps</a> are used to +where <a href="manual.html#option_keyMap">keymaps</a> are used to bind behavior to keys. This means <a href="../demo/emacs.html">custom bindings</a> are now possible.</p> @@ -40,7 +40,7 @@ behavior, <code>tabMode</code>, <code>enterMode</code>, and <code>smartHome</code>, are no longer supported. Instead, you can provide custom bindings to influence the way these keys act. This is done through the -new <a href="../manual.html#option_extraKeys"><code>extraKeys</code></a> +new <a href="manual.html#option_extraKeys"><code>extraKeys</code></a> option, which can hold an object mapping key names to functionality. A simple example would be:</p> diff --git a/index.html b/index.html index 16b2fbbbe980d860e8de01191987edd05c979e45..9c0ae96cdfc1d3e940c4bd33b8639bd74e3f7bf1 100644 --- a/index.html +++ b/index.html @@ -117,7 +117,7 @@ release</a> or the current <a href="http://codemirror.net/codemirror2-latest.zip">development snapshot</a> as zip files. To create a custom minified script file, - you can use the <a href="compress.html">compression API</a>.</p> + you can use the <a href="doc/compress.html">compression API</a>.</p> <p>We use <a href="http://git-scm.com/">git</a> for version control. The main repository can be fetched in this way:</p> @@ -131,12 +131,12 @@ <h2 id="documention">Documentation</h2> - <p>The <a href="manual.html">manual</a> is your first stop for + <p>The <a href="doc/manual.html">manual</a> is your first stop for learning how to use this library. It starts with a quick explanation of how to use the editor, and then describes the API in detail.</p> <p>For those who want to learn more about the code, there is - an <a href="internals.html">overview of the internals</a> available. + an <a href="doc/internals.html">overview of the internals</a> available. The <a href="http://github.com/marijnh/CodeMirror2">source code</a> itself is, for the most part, also well commented.</p> @@ -225,13 +225,13 @@ <p class="rel">21-11-2011: <a href="http://codemirror.net/codemirror-2.17.zip">Version 2.17</a>:</p> <ul class="rel-note"> - <li>Add support for <a href="manual.html#option_lineWrapping">line - wrapping</a> and <a href="manual.html#hideLine">code + <li>Add support for <a href="doc/manual.html#option_lineWrapping">line + wrapping</a> and <a href="doc/manual.html#hideLine">code folding</a>.</li> <li>Add <a href="mode/gfm/index.html">Github-style Markdown</a> mode.</li> <li>Add <a href="theme/monokai.css">Monokai</a> and <a href="theme/rubyblue.css">Rubyblue</a> themes.</li> - <li>Add <a href="manual.html#setBookmark"><code>setBookmark</code></a> method.</li> + <li>Add <a href="doc/manual.html#setBookmark"><code>setBookmark</code></a> method.</li> <li>Move some of the demo code into reusable components under <a href="lib/util/"><code>lib/util</code></a>.</li> <li>Make screen-coord-finding code faster and more reliable.</li> @@ -247,9 +247,9 @@ <ul class="rel-note"> <li>Add <a href="mode/perl/index.html">Perl</a>, <a href="mode/rust/index.html">Rust</a>, <a href="mode/tiddlywiki/index.html">TiddlyWiki</a>, and <a href="mode/groovy/index.html">Groovy</a> modes.</li> <li>Dragging text inside the editor now moves, rather than copies.</li> - <li>Add a <a href="manual.html#coordsFromIndex"><code>coordsFromIndex</code></a> method.</li> - <li><strong>API change</strong>: <code>setValue</code> now no longer clears history. Use <a href="manual.html#clearHistory"><code>clearHistory</code></a> for that.</li> - <li><strong>API change</strong>: <a href="manual.html#markText"><code>markText</code></a> now + <li>Add a <a href="doc/manual.html#coordsFromIndex"><code>coordsFromIndex</code></a> method.</li> + <li><strong>API change</strong>: <code>setValue</code> now no longer clears history. Use <a href="doc/manual.html#clearHistory"><code>clearHistory</code></a> for that.</li> + <li><strong>API change</strong>: <a href="doc/manual.html#markText"><code>markText</code></a> now returns an object with <code>clear</code> and <code>find</code> methods. Marked text is now more robust when edited.</li> <li>Fix editing code with tabs in Internet Explorer.</li> @@ -264,7 +264,7 @@ <ul class="rel-note"> <li>Add <a href="mode/clojure/index.html">Clojure</a>, <a href="mode/pascal/index.html">Pascal</a>, <a href="mode/ntriples/index.html">NTriples</a>, <a href="mode/jinja2/index.html">Jinja2</a>, and <a href="mode/markdown/index.html">Markdown</a> modes.</li> <li>Add <a href="theme/cobalt.css">Cobalt</a> and <a href="theme/eclipse.css">Eclipse</a> themes.</li> - <li>Add a <a href="manual.html#option_fixedGutter"><code>fixedGutter</code></a> option.</li> + <li>Add a <a href="doc/manual.html#option_fixedGutter"><code>fixedGutter</code></a> option.</li> <li>Fix bug with <code>setValue</code> breaking cursor movement.</li> <li>Make gutter updates much more efficient.</li> <li>Allow dragging of text out of the editor (on modern browsers).</li> @@ -273,9 +273,9 @@ <p class="rel">23-08-2011: <a href="http://codemirror.net/codemirror-2.13.zip">Version 2.13</a>:</p> <ul class="rel-note"> <li>Add <a href="mode/ruby/index.html">Ruby</a>, <a href="mode/r/index.html">R</a>, <a href="mode/coffeescript/index.html">CoffeeScript</a>, and <a href="mode/velocity/index.html">Velocity</a> modes.</li> - <li>Add <a href="manual.html#getGutterElement"><code>getGutterElement</code></a> to API.</li> + <li>Add <a href="doc/manual.html#getGutterElement"><code>getGutterElement</code></a> to API.</li> <li>Several fixes to scrolling and positioning.</li> - <li>Add <a href="manual.html#option_smartHome"><code>smartHome</code></a> option.</li> + <li>Add <a href="doc/manual.html#option_smartHome"><code>smartHome</code></a> option.</li> <li>Add an experimental <a href="mode/xmlpure/index.html">pure XML</a> mode.</li> </ul> @@ -308,7 +308,7 @@ <p class="rel">07-06-2011: <a href="http://codemirror.net/codemirror-2.1.zip">Version 2.1</a>:</p> <p class="rel-note">Add - a <a href="manual.html#option_theme">theme</a> system + a <a href="doc/manual.html#option_theme">theme</a> system (<a href="demo/theme.html">demo</a>). Note that this is not backwards-compatible—you'll have to update your styles and modes!</p> @@ -325,7 +325,7 @@ <li>Fix problem with 'sticking' horizontal scrollbar.</li> </ul> - <p><a href="oldrelease.html">Older releases...</a></p> + <p><a href="doc/oldrelease.html">Older releases...</a></p> </div></div>