Fix: merge conflict
[myslice.git] / to-be-integrated / third-party / codemirror-3.15 / mode / php / index.html
1 <!doctype html>
2 <html>
3   <head>
4     <meta charset="utf-8">
5     <title>CodeMirror: PHP mode</title>
6     <link rel="stylesheet" href="../../lib/codemirror.css">
7     <script src="../../lib/codemirror.js"></script>
8     <script src="../../addon/edit/matchbrackets.js"></script>
9     <script src="../htmlmixed/htmlmixed.js"></script>
10     <script src="../xml/xml.js"></script>
11     <script src="../javascript/javascript.js"></script>
12     <script src="../css/css.js"></script>
13     <script src="../clike/clike.js"></script>
14     <script src="php.js"></script>
15     <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
16     <link rel="stylesheet" href="../../doc/docs.css">
17   </head>
18   <body>
19     <h1>CodeMirror: PHP mode</h1>
20
21 <form><textarea id="code" name="code">
22 <?php
23 function hello($who) {
24         return "Hello " . $who;
25 }
26 ?>
27 <p>The program says <?= hello("World") ?>.</p>
28 <script>
29         alert("And here is some JS code"); // also colored
30 </script>
31 </textarea></form>
32
33     <script>
34       var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
35         lineNumbers: true,
36         matchBrackets: true,
37         mode: "application/x-httpd-php",
38         indentUnit: 4,
39         indentWithTabs: true,
40         enterMode: "keep",
41         tabMode: "shift"
42       });
43     </script>
44
45     <p>Simple HTML/PHP mode based on
46     the <a href="../clike/">C-like</a> mode. Depends on XML,
47     JavaScript, CSS, HTMLMixed, and C-like modes.</p>
48
49     <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>
50   </body>
51 </html>