3 <title>CodeMirror: Smarty mixed mode
</title>
4 <meta charset=
"utf-8"/>
5 <link rel=stylesheet
href=
"../../doc/docs.css">
7 <link rel=
"stylesheet" href=
"../../lib/codemirror.css">
8 <script src=
"../../lib/codemirror.js"></script>
9 <script src=
"../../mode/xml/xml.js"></script>
10 <script src=
"../../mode/javascript/javascript.js"></script>
11 <script src=
"../../mode/css/css.js"></script>
12 <script src=
"../../mode/htmlmixed/htmlmixed.js"></script>
13 <script src=
"../../mode/smarty/smarty.js"></script>
14 <script src=
"../../mode/smartymixed/smartymixed.js"></script>
16 <a href=
"http://codemirror.net"><img id=logo
src=
"../../doc/logo.png"></a>
19 <li><a href=
"../../index.html">Home
</a>
20 <li><a href=
"../../doc/manual.html">Manual
</a>
21 <li><a href=
"https://github.com/marijnh/codemirror">Code
</a>
24 <li><a href=
"../index.html">Language modes
</a>
25 <li><a class=active
href=
"#">Smarty mixed
</a>
30 <h2>Smarty mixed mode
</h2>
31 <form><textarea id=
"code" name=
"code">
33 * @brief Smarty mixed mode
34 * @author Ruslan Osmanov
39 <title>{$title|htmlspecialchars|truncate:
30}
</title>
41 <body class=
"{$bodyclass}">
43 * comment, no {$variables} here
46 {literal} is just an HTML text.
47 <script type=
"text/javascript">//<![CDATA[
48 var a = {$just_a_normal_js_object :
"value"};
49 var myCodeMirror = CodeMirror.fromTextArea(document.getElementById(
"code"), {
53 indentWithTabs : false,
62 .some-class { font-weight: bolder; color:
"orange"; }
66 {extends
file=
"parent.tpl"}
67 {include
file=
"template.tpl"}
69 {* some example Smarty content *}
70 {if isset($name) && $name == 'Blog'}
72 {$integer =
4511}, {$array[] =
"a"}, {$stringvar =
"string"}
73 {$integer =
4512} {$array[] =
"a"} {$stringvar =
"string"}
74 {assign var='bob' value=$var.prop}
75 {elseif $name == $foo}
76 {function name=menu level=
0}
77 {foreach $data as $entry}
80 {menu data=$entry level=$level+
1}
96 <script type=
"text/javascript">
97 var myCodeMirror = CodeMirror.fromTextArea(document.getElementById(
"code"), {
101 indentWithTabs : false,
104 matchBrackets : true,
108 <p>The Smarty mixed mode depends on the Smarty and HTML mixed modes. HTML
109 mixed mode itself depends on XML, JavaScript, and CSS modes.
</p>
111 <p>It takes the same options, as Smarty and HTML mixed modes.
</p>
113 <p><strong>MIME types defined:
</strong> <code>text/x-smarty
</code>.
</p>