source: branches/2.2/plugins/LocalFilesEditor/codemirror/mode/htmlmixed/index.html @ 10310

Last change on this file since 10310 was 10310, checked in by patdenice, 13 years ago

merge r10307 from trunk to branch 2.2
feature:2262
Replace editarea by Codemirror:
http://codemirror.net

File size: 1.7 KB
Line 
1<!doctype html>
2<html>
3  <head>
4    <title>CodeMirror 2: HTML mixed mode</title>
5    <link rel="stylesheet" href="../../lib/codemirror.css">
6    <script src="../../lib/codemirror.js"></script>
7    <script src="../xml/xml.js"></script>
8    <link rel="stylesheet" href="../xml/xml.css">
9    <script src="../javascript/javascript.js"></script>
10    <link rel="stylesheet" href="../javascript/javascript.css">
11    <script src="../css/css.js"></script>
12    <link rel="stylesheet" href="../css/css.css">
13    <script src="htmlmixed.js"></script>
14    <link rel="stylesheet" href="../../css/docs.css">
15    <style>.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
16  </head>
17  <body>
18    <h1>CodeMirror 2: HTML mixed mode</h1>
19    <form><textarea id="code" name="code">
20<html style="color: green">
21  <!-- this is a comment -->
22  <head>
23    <title>Mixed HTML Example</title>
24    <style type="text/css">
25      h1 {font-family: comic sans; color: #f0f;}
26      div {background: yellow !important;}
27      body {
28        max-width: 50em;
29        margin: 1em 2em 1em 5em;
30      }
31    </style>
32  </head>
33  <body>
34    <h1>Mixed HTML Example</h1>
35    <script>
36      function jsFunc(arg1, arg2) {
37        if (arg1 && arg2) document.body.innerHTML = "achoo";
38      }
39    </script>
40  </body>
41</html>
42</textarea></form>
43    <script>
44      var editor = CodeMirror.fromTextArea(document.getElementById("code"), {mode: "text/html", tabMode: "indent"});
45    </script>
46
47    <p>The HTML mixed mode depends on the XML, JavaScript, and CSS modes.</p>
48
49    <p><strong>MIME types defined:</strong> <code>text/html</code>
50    (redefined, only takes effect if you load this parser after the
51    XML parser).</p>
52
53  </body>
54</html>
Note: See TracBrowser for help on using the repository browser.