Fix: merge conflict
[myslice.git] / third-party / codemirror-3.15 / mode / htmlembedded / index.html
1 <!doctype html>
2 <html>
3   <head>
4     <meta charset="utf-8">
5     <title>CodeMirror: Html Embedded Scripts mode</title>
6     <link rel="stylesheet" href="../../lib/codemirror.css">
7     <script src="../../lib/codemirror.js"></script>
8     <script src="../xml/xml.js"></script>
9     <script src="../javascript/javascript.js"></script>
10     <script src="../css/css.js"></script>
11     <script src="../htmlmixed/htmlmixed.js"></script>
12     <script src="htmlembedded.js"></script>
13     <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
14     <link rel="stylesheet" href="../../doc/docs.css">
15   </head>
16   <body>
17     <h1>CodeMirror: Html Embedded Scripts mode</h1>
18
19 <form><textarea id="code" name="code">
20 <%
21 function hello(who) {
22         return "Hello " + who;
23 }
24 %>
25 This is an example of EJS (embedded javascript)
26 <p>The program says <%= hello("world") %>.</p>
27 <script>
28         alert("And here is some normal JS code"); // also colored
29 </script>
30 </textarea></form>
31
32     <script>
33       var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
34         lineNumbers: true,
35         mode: "application/x-ejs",
36         indentUnit: 4,
37         indentWithTabs: true,
38         enterMode: "keep",
39         tabMode: "shift"
40       });
41     </script>
42
43     <p>Mode for html embedded scripts like JSP and ASP.NET. Depends on HtmlMixed which in turn depends on
44     JavaScript, CSS and XML.<br />Other dependancies include those of the scriping language chosen.</p>
45
46     <p><strong>MIME types defined:</strong> <code>application/x-aspx</code> (ASP.NET), 
47     <code>application/x-ejs</code> (Embedded Javascript), <code>application/x-jsp</code> (JavaServer Pages)</p>
48   </body>
49 </html>