aboutsummaryrefslogtreecommitdiff
path: root/imports/codemirror/mode/htmlembedded/index.html
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-02-20 11:14:44 -0800
committerNivesh Rajbhandari2012-02-20 11:14:44 -0800
commitabf78e2d7a97d295ce5a1c425fd359d47379137e (patch)
treed08c91bd2aef31e6325e0b499b2ffc390018bec6 /imports/codemirror/mode/htmlembedded/index.html
parente80a79bff57fecf3aa9b869d8ed2de5fd815287c (diff)
parente23708721a71ca4c71365f5f8e8ac7d6113926db (diff)
downloadninja-abf78e2d7a97d295ce5a1c425fd359d47379137e.tar.gz
Merge branch 'refs/heads/ninja-internal' into ToolFixes
Diffstat (limited to 'imports/codemirror/mode/htmlembedded/index.html')
-rwxr-xr-ximports/codemirror/mode/htmlembedded/index.html49
1 files changed, 49 insertions, 0 deletions
diff --git a/imports/codemirror/mode/htmlembedded/index.html b/imports/codemirror/mode/htmlembedded/index.html
new file mode 100755
index 00000000..c1374e58
--- /dev/null
+++ b/imports/codemirror/mode/htmlembedded/index.html
@@ -0,0 +1,49 @@
1<!doctype html>
2<html>
3 <head>
4 <title>CodeMirror: Html Embedded Scripts 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 <script src="../javascript/javascript.js"></script>
9 <script src="../css/css.js"></script>
10 <script src="../htmlmixed/htmlmixed.js"></script>
11 <script src="htmlembedded.js"></script>
12 <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
13 <link rel="stylesheet" href="../../doc/docs.css">
14 </head>
15 <body>
16 <h1>CodeMirror: Html Embedded Scripts mode</h1>
17
18<form><textarea id="code" name="code">
19<%
20function hello(who) {
21 return "Hello " + who;
22}
23%>
24This is an example of EJS (embedded javascript)
25<p>The program says <%= hello("world") %>.</p>
26<script>
27 alert("And here is some normal JS code"); // also colored
28</script>
29</textarea></form>
30
31 <script>
32 var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
33 lineNumbers: true,
34 matchBrackets: 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>