github.com/jancarloviray/community@v0.41.1-0.20170124221257-33a66c87cf2f/app/public/codemirror/mode/xml/index.html (about)

     1  <!doctype html>
     2  
     3  <title>CodeMirror: XML mode</title>
     4  <meta charset="utf-8"/>
     5  <link rel=stylesheet href="../../doc/docs.css">
     6  
     7  <link rel="stylesheet" href="../../lib/codemirror.css">
     8  <script src="../../lib/codemirror.js"></script>
     9  <script src="xml.js"></script>
    10  <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
    11  <div id=nav>
    12    <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
    13  
    14    <ul>
    15      <li><a href="../../index.html">Home</a>
    16      <li><a href="../../doc/manual.html">Manual</a>
    17      <li><a href="https://github.com/codemirror/codemirror">Code</a>
    18    </ul>
    19    <ul>
    20      <li><a href="../index.html">Language modes</a>
    21      <li><a class=active href="#">XML</a>
    22    </ul>
    23  </div>
    24  
    25  <article>
    26  <h2>XML mode</h2>
    27  <form><textarea id="code" name="code">
    28  &lt;html style="color: green"&gt;
    29    &lt;!-- this is a comment --&gt;
    30    &lt;head&gt;
    31      &lt;title&gt;HTML Example&lt;/title&gt;
    32    &lt;/head&gt;
    33    &lt;body&gt;
    34      The indentation tries to be &lt;em&gt;somewhat &amp;quot;do what
    35      I mean&amp;quot;&lt;/em&gt;... but might not match your style.
    36    &lt;/body&gt;
    37  &lt;/html&gt;
    38  </textarea></form>
    39      <script>
    40        var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
    41          mode: "text/html",
    42          lineNumbers: true
    43        });
    44      </script>
    45      <p>The XML mode supports two configuration parameters:</p>
    46      <dl>
    47        <dt><code>htmlMode (boolean)</code></dt>
    48        <dd>This switches the mode to parse HTML instead of XML. This
    49        means attributes do not have to be quoted, and some elements
    50        (such as <code>br</code>) do not require a closing tag.</dd>
    51        <dt><code>alignCDATA (boolean)</code></dt>
    52        <dd>Setting this to true will force the opening tag of CDATA
    53        blocks to not be indented.</dd>
    54      </dl>
    55  
    56      <p><strong>MIME types defined:</strong> <code>application/xml</code>, <code>text/html</code>.</p>
    57    </article>