5 <title>CodeMirror: Smarty mixed mode</title>
6 <link rel="stylesheet" href="../../lib/codemirror.css">
7 <script src="../../lib/codemirror.js"></script>
8 <link rel="stylesheet" href="../../doc/docs.css">
10 <!-- smartymixed dependencies -->
11 <script src="../../mode/xml/xml.js"></script>
12 <script src="../../mode/javascript/javascript.js"></script>
13 <script src="../../mode/css/css.js"></script>
14 <script src="../../mode/htmlmixed/htmlmixed.js"></script>
15 <script src="../../mode/smarty/smarty.js"></script>
18 <script src="../../mode/smartymixed/smartymixed.js"></script>
21 <h1>CodeMirror: Smarty mixed mode</h1>
22 <form><textarea id="code" name="code">
24 * @brief Smarty mixed mode
25 * @author Ruslan Osmanov
30 <title>{$title|htmlspecialchars|truncate:30}</title>
34 * comment, no {$variables} here
37 {literal} is just an HTML text.
38 <script type="text/javascript">//<![CDATA[
39 var a = {$just_a_normal_js_object : "value"};
40 var myCodeMirror = CodeMirror.fromTextArea(document.getElementById("code"), {
44 indentWithTabs : false,
53 .some-class { font-weight: bolder; color: "orange"; }
57 {extends file="parent.tpl"}
58 {include file="template.tpl"}
60 {* some example Smarty content *}
61 {if isset($name) && $name == 'Blog'}
63 {$integer = 4511}, {$array[] = "a"}, {$stringvar = "string"}
64 {$integer = 4512} {$array[] = "a"} {$stringvar = "string"}
65 {assign var='bob' value=$var.prop}
66 {elseif $name == $foo}
67 {function name=menu level=0}
68 {foreach $data as $entry}
71 {menu data=$entry level=$level+1}
87 <script type="text/javascript">
88 var myCodeMirror = CodeMirror.fromTextArea(document.getElementById("code"), {
92 indentWithTabs : false,
99 <p>The Smarty mixed mode depends on the Smarty and HTML mixed modes. HTML
100 mixed mode itself depends on XML, JavaScript, and CSS modes.</p>
102 <p>It takes the same options, as Smarty and HTML mixed modes.</p>
104 <p><strong>MIME types defined:</strong> <code>text/x-smarty</code>.</p>
107 <!-- vim: set ft=html ts=2 sts=2 sw=2 et: -->