Mercurial
comparison .cms/lib/codemirror/mode/tornado/index.html @ 0:78edf6b517a0 draft
24.10
author | Coffee CMS <info@coffee-cms.ru> |
---|---|
date | Fri, 11 Oct 2024 22:40:23 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:78edf6b517a0 |
---|---|
1 <!doctype html> | |
2 | |
3 <title>CodeMirror: Tornado template mode</title> | |
4 <meta charset="utf-8"/> | |
5 <link rel=stylesheet href="../../doc/docs.css"> | |
6 | |
7 <link rel="stylesheet" href="../../lib/codemirror.css"> | |
8 <script src="../../lib/codemirror.js"></script> | |
9 <script src="../../addon/mode/overlay.js"></script> | |
10 <script src="../xml/xml.js"></script> | |
11 <script src="../htmlmixed/htmlmixed.js"></script> | |
12 <script src="tornado.js"></script> | |
13 <style>.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style> | |
14 <div id=nav> | |
15 <a href="https://codemirror.net/5"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png" alt=""></a> | |
16 | |
17 <ul> | |
18 <li><a href="../../index.html">Home</a> | |
19 <li><a href="../../doc/manual.html">Manual</a> | |
20 <li><a href="https://github.com/marijnh/codemirror">Code</a> | |
21 </ul> | |
22 <ul> | |
23 <li><a href="../index.html">Language modes</a> | |
24 <li><a class=active href="#">Tornado</a> | |
25 </ul> | |
26 </div> | |
27 | |
28 <article> | |
29 <h2>Tornado template mode</h2> | |
30 <form><textarea id="code" name="code"> | |
31 <!doctype html> | |
32 <html> | |
33 <head> | |
34 <title>My Tornado web application</title> | |
35 </head> | |
36 <body> | |
37 <h1> | |
38 {{ title }} | |
39 </h1> | |
40 <ul class="my-list"> | |
41 {% for item in items %} | |
42 <li>{% item.name %}</li> | |
43 {% empty %} | |
44 <li>You have no items in your list.</li> | |
45 {% end %} | |
46 </ul> | |
47 </body> | |
48 </html> | |
49 </textarea></form> | |
50 | |
51 <script> | |
52 var editor = CodeMirror.fromTextArea(document.getElementById("code"), { | |
53 lineNumbers: true, | |
54 mode: "tornado", | |
55 indentUnit: 4, | |
56 indentWithTabs: true | |
57 }); | |
58 </script> | |
59 | |
60 <p>Mode for HTML with embedded Tornado template markup.</p> | |
61 | |
62 <p><strong>MIME types defined:</strong> <code>text/x-tornado</code></p> | |
63 </article> |