3 <title>CodeMirror: XML mode
</title>
4 <meta charset=
"utf-8"/>
5 <link rel=stylesheet
href=
"../../doc/docs.css">
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>
12 <a href=
"http://codemirror.net"><img id=logo
src=
"../../doc/logo.png"></a>
15 <li><a href=
"../../index.html">Home
</a>
16 <li><a href=
"../../doc/manual.html">Manual
</a>
17 <li><a href=
"https://github.com/marijnh/codemirror">Code
</a>
20 <li><a href=
"../index.html">Language modes
</a>
21 <li><a class=active
href=
"#">XML
</a>
27 <form><textarea id=
"code" name=
"code">
28 <html
style=
"color: green">
29 <!-- this is a comment --
>
31 <title
>HTML Example
</title
>
34 The indentation tries to be
<em
>somewhat
&quot;do what
35 I mean
&quot;
</em
>... but might not match your style.
40 var editor = CodeMirror.fromTextArea(document.getElementById(
"code"), {
45 <p>The XML mode supports two configuration parameters:
</p>
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>
56 <p><strong>MIME types defined:
</strong> <code>application/xml
</code>,
<code>text/html
</code>.
</p>