diff options
author | Pushkar Joshi | 2012-02-24 12:08:49 -0800 |
---|---|---|
committer | Pushkar Joshi | 2012-02-24 12:08:49 -0800 |
commit | 03ca7a5ed13c25faaa9100bb666e062fd15335e6 (patch) | |
tree | c51112223ceb9121cd595a60335eb2795215590f /imports/codemirror/mode/php/index.html | |
parent | fcb12cc09eb3cd3b42bd215877ba18f449275b75 (diff) | |
parent | 053fc63a2950c7a5ee4ebf98033b64d474a3c46e (diff) | |
download | ninja-03ca7a5ed13c25faaa9100bb666e062fd15335e6.tar.gz |
Merge branch 'pentool' into brushtool
Conflicts:
imports/codemirror/mode/scheme/scheme.js
js/tools/BrushTool.js
Diffstat (limited to 'imports/codemirror/mode/php/index.html')
-rwxr-xr-x | imports/codemirror/mode/php/index.html | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/imports/codemirror/mode/php/index.html b/imports/codemirror/mode/php/index.html new file mode 100755 index 00000000..7949044e --- /dev/null +++ b/imports/codemirror/mode/php/index.html | |||
@@ -0,0 +1,48 @@ | |||
1 | <!doctype html> | ||
2 | <html> | ||
3 | <head> | ||
4 | <title>CodeMirror: PHP 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="../clike/clike.js"></script> | ||
11 | <script src="php.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: PHP mode</h1> | ||
17 | |||
18 | <form><textarea id="code" name="code"> | ||
19 | <?php | ||
20 | function hello($who) { | ||
21 | return "Hello " . $who; | ||
22 | } | ||
23 | ?> | ||
24 | <p>The program says <?= hello("World") ?>.</p> | ||
25 | <script> | ||
26 | alert("And here is some JS code"); // also colored | ||
27 | </script> | ||
28 | </textarea></form> | ||
29 | |||
30 | <script> | ||
31 | var editor = CodeMirror.fromTextArea(document.getElementById("code"), { | ||
32 | lineNumbers: true, | ||
33 | matchBrackets: true, | ||
34 | mode: "application/x-httpd-php", | ||
35 | indentUnit: 4, | ||
36 | indentWithTabs: true, | ||
37 | enterMode: "keep", | ||
38 | tabMode: "shift" | ||
39 | }); | ||
40 | </script> | ||
41 | |||
42 | <p>Simple HTML/PHP mode based on | ||
43 | the <a href="../clike/">C-like</a> mode. Depends on XML, | ||
44 | JavaScript, CSS, and C-like modes.</p> | ||
45 | |||
46 | <p><strong>MIME types defined:</strong> <code>application/x-httpd-php</code> (HTML with PHP code), <code>text/x-php</code> (plain, non-wrapped PHP code).</p> | ||
47 | </body> | ||
48 | </html> | ||