diff options
author | Jose Antonio Marquez | 2012-02-15 20:37:48 -0800 |
---|---|---|
committer | Jose Antonio Marquez | 2012-02-15 20:37:48 -0800 |
commit | 89b5e793ea88ef235b54b6e1d1c379698d3e612b (patch) | |
tree | 4d29118f35df77ca6b423119a4ff61694a442cbf /imports/codemirror/mode/htmlembedded/index.html | |
parent | 9d2c2a80483415d7560b00cda5519153db23e241 (diff) | |
parent | d366c0bd1af6471511217ed574083e15059519b5 (diff) | |
download | ninja-89b5e793ea88ef235b54b6e1d1c379698d3e612b.tar.gz |
Merge branch 'refs/heads/NinjaInternal' into Color
Diffstat (limited to 'imports/codemirror/mode/htmlembedded/index.html')
-rwxr-xr-x | imports/codemirror/mode/htmlembedded/index.html | 49 |
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 | <% | ||
20 | function hello(who) { | ||
21 | return "Hello " + who; | ||
22 | } | ||
23 | %> | ||
24 | This 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> | ||