File modules/editor/codemirror/mode/jinja2/index.html

Last commit: Sun Dec 17 01:14:09 2017 +0100	Jan Dankert	Integration eines weiteren Code-Editors: Codemirror. Demnächst müssen wir hier mal aufräumen und andere Editoren rauswerfen.
1 <!doctype html> 2 3 <title>CodeMirror: Jinja2 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="jinja2.js"></script> 10 <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style> 11 <div id=nav> 12 <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a> 13 14 <ul> 15 <li><a href="../../index.html">Home</a> 16 <li><a href="../../doc/manual.html">Manual</a> 17 <li><a href="https://github.com/codemirror/codemirror">Code</a> 18 </ul> 19 <ul> 20 <li><a href="../index.html">Language modes</a> 21 <li><a class=active href="#">Jinja2</a> 22 </ul> 23 </div> 24 25 <article> 26 <h2>Jinja2 mode</h2> 27 <form><textarea id="code" name="code"> 28 {# this is a comment #} 29 {%- for item in li -%} 30 &lt;li&gt;{{ item.label }}&lt;/li&gt; 31 {% endfor -%} 32 {{ item.sand == true and item.keyword == false ? 1 : 0 }} 33 {{ app.get(55, 1.2, true) }} 34 {% if app.get(&#39;_route&#39;) == (&#39;_home&#39;) %}home{% endif %} 35 {% if app.session.flashbag.has(&#39;message&#39;) %} 36 {% for message in app.session.flashbag.get(&#39;message&#39;) %} 37 {{ message.content }} 38 {% endfor %} 39 {% endif %} 40 {{ path(&#39;_home&#39;, {&#39;section&#39;: app.request.get(&#39;section&#39;)}) }} 41 {{ path(&#39;_home&#39;, { 42 &#39;section&#39;: app.request.get(&#39;section&#39;), 43 &#39;boolean&#39;: true, 44 &#39;number&#39;: 55.33 45 }) 46 }} 47 {% include (&#39;test.incl.html.twig&#39;) %} 48 </textarea></form> 49 <script> 50 var editor = 51 CodeMirror.fromTextArea(document.getElementById("code"), {mode: 52 {name: "jinja2", htmlMode: true}}); 53 </script> 54 </article>
Download modules/editor/codemirror/mode/jinja2/index.html
History Sun, 17 Dec 2017 01:14:09 +0100 Jan Dankert Integration eines weiteren Code-Editors: Codemirror. Demnächst müssen wir hier mal aufräumen und andere Editoren rauswerfen.