~ubuntu-branches/ubuntu/utopic/codemirror-js/utopic

« back to all changes in this revision

Viewing changes to mode/jinja2/index.html

  • Committer: Package Import Robot
  • Author(s): David Paleino
  • Date: 2012-04-12 12:25:28 UTC
  • Revision ID: package-import@ubuntu.com-20120412122528-8xp5a8frj4h1d3ee
Tags: upstream-2.23
ImportĀ upstreamĀ versionĀ 2.23

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!doctype html>
 
2
<html>
 
3
  <head>
 
4
    <title>CodeMirror: Jinja2 mode</title>
 
5
    <link rel="stylesheet" href="../../lib/codemirror.css">
 
6
    <script src="../../lib/codemirror.js"></script>
 
7
    <script src="jinja2.js"></script>
 
8
    <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
 
9
    <link rel="stylesheet" href="../../doc/docs.css">
 
10
  </head>
 
11
  <body>
 
12
    <h1>CodeMirror: Jinja2 mode</h1>
 
13
    <form><textarea id="code" name="code">
 
14
&lt;html style="color: green"&gt;
 
15
  &lt;!-- this is a comment --&gt;
 
16
  &lt;head&gt;
 
17
    &lt;title&gt;Jinja2 Example&lt;/title&gt;
 
18
  &lt;/head&gt;
 
19
  &lt;body&gt;
 
20
    &lt;ul&gt;
 
21
    {# this is a comment #}
 
22
    {%- for item in li -%}
 
23
      &lt;li&gt;
 
24
        {{ item.label }}
 
25
      &lt;/li&gt;
 
26
    {% endfor -%}
 
27
    &lt;/ul&gt;
 
28
  &lt;/body&gt;
 
29
&lt;/html&gt;
 
30
</textarea></form>
 
31
    <script>
 
32
      var editor =
 
33
      CodeMirror.fromTextArea(document.getElementById("code"), {mode:
 
34
        {name: "jinja2", htmlMode: true}});
 
35
    </script>
 
36
  </body>
 
37
</html>