Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 52 lines (49 sloc) 1.459 kb
4265879f » marijnh
2008-08-10 add a mixed-mode parser
1 <html xmlns="http://www.w3.org/1999/xhtml">
2 <head>
3 <script src="js/codemirror.js" type="text/javascript"></script>
4 <title>CodeMirror: HTML mixed-mode demonstration</title>
5 <link rel="stylesheet" type="text/css" href="css/docs.css"/>
6 </head>
7 <body style="padding: 20px;">
8
9 <p>This is a simple demonstration of the HTML mixed-mode indentation
4414de4b » marijnh
2008-08-11 simplify mixed test page
10 module for <a href="index.html">CodeMirror</a>. Script tags use the JS
11 parser, style tags use the CSS parser.</p>
4265879f » marijnh
2008-08-10 add a mixed-mode parser
12
13 <div style="border: 1px solid black; padding: 3px;">
14 <textarea id="code" cols="120" rows="30">
4414de4b » marijnh
2008-08-11 simplify mixed test page
15 &lt;html>
4265879f » marijnh
2008-08-10 add a mixed-mode parser
16 &lt;head>
17 &lt;title>HTML Example&lt;/title>
18 &lt;script type="text/javascript">
19 function foo(bar, baz) {
20 alert("quux");
21 return bar + baz + 1;
22 }
23 &lt;/script>
24 &lt;style type="text/css">
25 div.border {
26 border: 1px solid black;
27 padding: 3px;
28 }
29 #foo code {
30 font-family: courier, monospace;
31 font-size: 80%;
32 color: #448888;
33 }
34 &lt;/style>
35 &lt;/head>
36 &lt;body>
37 &lt;p>Duh&lt;/p>
38 &lt;/body>
39 &lt;/html>
40 </textarea>
41 </div>
42
43 <script type="text/javascript">
44 var editor = CodeMirror.fromTextArea('code', {
45 height: "350px",
46 parserfile: ["parsexml.js", "parsecss.js", "tokenizejavascript.js", "parsejavascript.js", "parsehtmlmixed.js"],
47 stylesheet: ["css/xmlcolors.css", "css/jscolors.css", "css/csscolors.css"],
48 path: "js/"
49 });
50 </script>
51 </body>
52 </html>
Something went wrong with that request. Please try again.