Skip to content

Commit 69fa5fd

Browse files
committed
Clean up documentation for addons, mention lint addon
1 parent 9e5599d commit 69fa5fd

File tree

1 file changed

+30
-33
lines changed

1 file changed

+30
-33
lines changed

doc/manual.html

Lines changed: 30 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,14 +1357,14 @@ <h2 id="addons">Add-ons</h2>
13571357
functionality. In brief, they are:</p>
13581358

13591359
<dl>
1360-
<dt id="addon_dialog"><a href="../addon/dialog/dialog.js"><code>dialog.js</code></a></dt>
1360+
<dt id="addon_dialog"><a href="../addon/dialog/dialog.js"><code>dialog/dialog.js</code></a></dt>
13611361
<dd>Provides a very simple way to query users for text input.
13621362
Adds an <code>openDialog</code> method to CodeMirror instances,
13631363
which can be called with an HTML fragment that provides the
13641364
prompt (should include an <code>input</code> tag), and a
13651365
callback function that is called when text has been entered.
13661366
Depends on <code>addon/dialog/dialog.css</code>.</dd>
1367-
<dt id="addon_searchcursor"><a href="../addon/search/searchcursor.js"><code>searchcursor.js</code></a></dt>
1367+
<dt id="addon_searchcursor"><a href="../addon/search/searchcursor.js"><code>search/searchcursor.js</code></a></dt>
13681368
<dd>Adds the <code>getSearchCursor(query, start, caseFold) →
13691369
cursor</code> method to CodeMirror instances, which can be used
13701370
to implement search/replace functionality. <code>query</code>
@@ -1393,29 +1393,29 @@ <h2 id="addons">Add-ons</h2>
13931393
replacement.</dd>
13941394
</dl></dd>
13951395

1396-
<dt id="addon_search"><a href="../addon/search/search.js"><code>search.js</code></a></dt>
1396+
<dt id="addon_search"><a href="../addon/search/search.js"><code>search/search.js</code></a></dt>
13971397
<dd>Implements the search commands. CodeMirror has keys bound to
13981398
these by default, but will not do anything with them unless an
13991399
implementation is provided. Depends
14001400
on <code>searchcursor.js</code>, and will make use
14011401
of <a href="#addon_dialog"><code>openDialog</code></a> when
14021402
available to make prompting for search queries less ugly.</dd>
1403-
<dt id="addon_matchbrackets"><a href="../addon/edit/matchbrackets.js"><code>matchbrackets.js</code></a></dt>
1403+
<dt id="addon_matchbrackets"><a href="../addon/edit/matchbrackets.js"><code>edit/matchbrackets.js</code></a></dt>
14041404
<dd>Defines an option <code>matchBrackets</code> which, when set
14051405
to true, causes matching brackets to be highlighted whenever the
14061406
cursor is next to them. It also adds a
14071407
method <code>matchBrackets</code> that forces this to happen
14081408
once, and a method <code>findMatchingBracket</code> that can be
14091409
used to run the bracket-finding algorithm that this uses
14101410
internally.</dd>
1411-
<dt id="addon_closebrackets"><a href="../addon/edit/closebrackets.js"><code>closebrackets.js</code></a></dt>
1411+
<dt id="addon_closebrackets"><a href="../addon/edit/closebrackets.js"><code>edit/closebrackets.js</code></a></dt>
14121412
<dd>Defines an option <code>autoCloseBrackets</code> that will
14131413
auto-close brackets and quotes when typed. By default, it'll
14141414
auto-close <code>()[]{}''""</code>, but you can pass it a
14151415
string similar to that (containing pairs of matching characters)
14161416
to customize it. <a href="../demo/closebrackets.html">Demo
14171417
here</a>.</dd>
1418-
<dt id="addon_foldcode"><a href="../addon/fold/foldcode.js"><code>foldcode.js</code></a></dt>
1418+
<dt id="addon_foldcode"><a href="../addon/fold/foldcode.js"><code>fold/foldcode.js</code></a></dt>
14191419
<dd>Helps with code folding.
14201420
See <a href="../demo/folding.html">the demo</a> for an example.
14211421
Call <code>CodeMirror.newFoldFunction</code> with a range-finder
@@ -1431,12 +1431,12 @@ <h2 id="addons">Add-ons</h2>
14311431
where indentation determines block structure (Python, Haskell),
14321432
and <code>CodeMirror.tagRangeFinder</code>, for XML-style
14331433
languages.</dd>
1434-
<dt id="addon_collapserange"><a href="../addon/fold/collapserange.js"><code>collapserange.js</code></a></dt>
1434+
<dt id="addon_collapserange"><a href="../addon/fold/collapserange.js"><code>fold/collapserange.js</code></a></dt>
14351435
<dd>Another approach to
14361436
folding. <a href="../demo/collapserange.html">See demo</a>.
14371437
Allows the user to select a range to fold by clicking in the
14381438
gutter.</dd>
1439-
<dt id="addon_runmode"><a href="../addon/runmode/runmode.js"><code>runmode.js</code></a></dt>
1439+
<dt id="addon_runmode"><a href="../addon/runmode/runmode.js"><code>runmode/runmode.js</code></a></dt>
14401440
<dd>Can be used to run a CodeMirror mode over text without
14411441
actually opening an editor instance.
14421442
See <a href="../demo/runmode.html">the demo</a> for an example.
@@ -1445,15 +1445,15 @@ <h2 id="addons">Add-ons</h2>
14451445
(without including all of CodeMirror) and
14461446
for <a href="../addon/runmode/runmode.node.js">running under
14471447
node.js</a>.</dd>
1448-
<dt id="addon_overlay"><a href="../addon/mode/overlay.js"><code>overlay.js</code></a></dt>
1448+
<dt id="addon_overlay"><a href="../addon/mode/overlay.js"><code>mode/overlay.js</code></a></dt>
14491449
<dd>Mode combinator that can be used to extend a mode with an
14501450
'overlay' — a secondary mode is run over the stream, along with
14511451
the base mode, and can color specific pieces of text without
14521452
interfering with the base mode.
14531453
Defines <code>CodeMirror.overlayMode</code>, which is used to
14541454
create such a mode. See <a href="../demo/mustache.html">this
14551455
demo</a> for a detailed example.</dd>
1456-
<dt id="addon_multiplex"><a href="../addon/mode/multiplex.js"><code>multiplex.js</code></a></dt>
1456+
<dt id="addon_multiplex"><a href="../addon/mode/multiplex.js"><code>mode/multiplex.js</code></a></dt>
14571457
<dd>Mode combinator that can be used to easily 'multiplex'
14581458
between several modes.
14591459
Defines <code>CodeMirror.multiplexingMode</code> which, when
@@ -1472,7 +1472,7 @@ <h2 id="addons">Add-ons</h2>
14721472
see the content between the delimiters.
14731473
See <a href="../demo/multiplex.html">this demo</a> for an
14741474
example.</dd>
1475-
<dt id="addon_show-hint"><a href="../addon/hint/show-hint.js"><code>show-hint.js</code></a></dt>
1475+
<dt id="addon_show-hint"><a href="../addon/hint/show-hint.js"><code>hint/show-hint.js</code></a></dt>
14761476
<dd>Provides a framework for showing autocompletion hints.
14771477
Defines <code>CodeMirror.showHint</code>, which takes a
14781478
CodeMirror instance and a hinting function, and pops up a widget
@@ -1482,44 +1482,41 @@ <h2 id="addons">Add-ons</h2>
14821482
is an array of strings (the completions), and <code>from</code>
14831483
and <code>to</code> give the start and end of the token that is
14841484
being completed. Depends
1485-
on <code>addon/hint/show-hint.css</code>.
1486-
See <a href="../demo/complete.html">the demo</a> for an
1485+
on <code>addon/hint/show-hint.css</code>. See the other files in
1486+
the <a href="../addon/hint/"><code>addon/hint</code></a> for
1487+
hint sources for various languages. Check
1488+
out <a href="../demo/complete.html">the demo</a> for an
14871489
example.</dd>
1488-
<dt id="addon_simple-hint"><a href="../addon/hint/simple-hint.js"><code>simple-hint.js</code></a></dt>
1489-
<dd>Defines <code>CodeMirror.simpleHint</code>, which is
1490-
compatible with <code>showHint</code>. Deprecated,
1491-
use <code>showHint</code> instead. Depends
1492-
on <code>addon/hint/simple-hint.css</code>.</dd>
1493-
<dt id="addon_javascript-hint"><a href="../addon/hint/javascript-hint.js"><code>javascript-hint.js</code></a></dt>
1494-
<dd>Defines <code>CodeMirror.javascriptHint</code>
1495-
and <code>CodeMirror.coffeescriptHint</code>, which are simple
1496-
hinting functions for the JavaScript and CoffeeScript
1497-
modes.</dd>
1498-
<dt id="addon_xml-hint"><a href="../addon/hint/xml-hint.js"><code>xml-hint.js</code></a></dt>
1499-
<dd>Defines <code>CodeMirror.xmlHint</code>, a hinting function
1500-
for XML (which requires a schema to be defined).</dd>
1501-
<dt id="addon_python-hint"><a href="../addon/hint/python-hint.js"><code>python-hint.js</code></a></dt>
1502-
<dd>Defines <code>CodeMirror.pythonHint</code>, a hinter for Python code.</dd>
15031490
<dt id="addon_match-highlighter"><a href="../addon/search/match-highlighter.js"><code>match-highlighter.js</code></a></dt>
15041491
<dd>Adds a <code>highlightSelectionMatches</code> option that
15051492
can be enabled to highlight all instances of a currently
15061493
selected word.
15071494
Demo <a href="../demo/matchhighlighter.html">here</a>.</dd>
1508-
<dt id="addon_mark-selection"><a href="../addon/selection/mark-selection.js"><code>mark-selection.js</code></a></dt>
1495+
<dt id="addon_lint"><a href="../addon/lint/lint.js"><code>lint/lint.js</code></a></dt>
1496+
<dd>Defines an interface component for showing linting warnings,
1497+
with pluggable warning sources
1498+
(see <a href="../addon/lint/json-lint.js"><code>json-lint.js</code></a>
1499+
and <a href="../addon/lint/javascript-lint.js"><code>javascript-lint.js</code></a>
1500+
in the same directory). Defines a <code>lintWith</code> option
1501+
that can be set to a warning source (for
1502+
example <code>CodeMirror.javascriptValidator</code>). Depends
1503+
on <code>addon/lint/lint.css</code>. A demo can be
1504+
found <a href="../demo/lint.html">here</a>.</dd>
1505+
<dt id="addon_mark-selection"><a href="../addon/selection/mark-selection.js"><code>selection/mark-selection.js</code></a></dt>
15091506
<dd>Causes the selected text to be marked with the CSS class
15101507
<code>CodeMirror-selectedtext</code> when the <code>styleSelectedText</code> option
15111508
is enabled. Useful to change the colour of the selection (in addition to the background),
15121509
like in <a href="../demo/markselection.html">this demo</a>.</dd>
1513-
<dt id="addon_active-line"><a href="../addon/selection/active-line.js"><code>active-line.js</code></a></dt>
1510+
<dt id="addon_active-line"><a href="../addon/selection/active-line.js"><code>selection/active-line.js</code></a></dt>
15141511
<dd>Defines a <code>styleActiveLine</code> option that, when enabled,
15151512
gives the wrapper of the active line the class <code>CodeMirror-activeline</code>,
15161513
and adds a background with the class <code>CodeMirror-activeline-background</code>.
15171514
is enabled. See the <a href="../demo/activeline.html">demo</a>.</dd>
1518-
<dt id="addon_closetag"><a href="../addon/edit/closetag.js"><code>closetag.js</code></a></dt>
1515+
<dt id="addon_closetag"><a href="../addon/edit/closetag.js"><code>edit/closetag.js</code></a></dt>
15191516
<dd>Provides utility functions for adding automatic tag closing
15201517
to XML modes. See
15211518
the <a href="../demo/closetag.html">demo</a>.</dd>
1522-
<dt id="addon_loadmode"><a href="../addon/mode/loadmode.js"><code>loadmode.js</code></a></dt>
1519+
<dt id="addon_loadmode"><a href="../addon/mode/loadmode.js"><code>mode/loadmode.js</code></a></dt>
15231520
<dd>Defines a <code>CodeMirror.requireMode(modename,
15241521
callback)</code> function that will try to load a given mode and
15251522
call the callback when it succeeded. You'll have to
@@ -1531,7 +1528,7 @@ <h2 id="addons">Add-ons</h2>
15311528
which will ensure the given mode is loaded and cause the given
15321529
editor instance to refresh its mode when the loading
15331530
succeeded. See the <a href="../demo/loadmode.html">demo</a>.</dd>
1534-
<dt id="addon_continuecomment"><a href="../addon/edit/continuecomment.js"><code>continuecomment.js</code></a></dt>
1531+
<dt id="addon_continuecomment"><a href="../addon/edit/continuecomment.js"><code>edit/continuecomment.js</code></a></dt>
15351532
<dd>Adds a <a href="#commands">command</a>
15361533
called <code>newlineAndIndentContinueComment</code> that you can
15371534
bind <code>Enter</code> to in order to have the editor prefix

0 commit comments

Comments
 (0)