File modules/editor/codemirror/mode/xml/index.html

Last commit: Sun Dec 17 01:14:09 2017 +0100	Jan Dankert	Integration eines weiteren Code-Editors: Codemirror. Demnächst müssen wir hier mal aufräumen und andere Editoren rauswerfen.
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 these 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>matchClosing (boolean)</code></dt> 52 <dd>Controls whether the mode checks that close tags match the 53 corresponding opening tag, and highlights mismatches as errors. 54 Defaults to true.</dd> 55 <dt><code>alignCDATA (boolean)</code></dt> 56 <dd>Setting this to true will force the opening tag of CDATA 57 blocks to not be indented.</dd> 58 </dl> 59 60 <p><strong>MIME types defined:</strong> <code>application/xml</code>, <code>text/html</code>.</p> 61 </article>
Download modules/editor/codemirror/mode/xml/index.html
History Sun, 17 Dec 2017 01:14:09 +0100 Jan Dankert Integration eines weiteren Code-Editors: Codemirror. Demnächst müssen wir hier mal aufräumen und andere Editoren rauswerfen.