<div class="editor">
  <textarea id="{$NAME}_id" name="{$NAME}">{$VALUE}</textarea>
</div>
<script>
  var code_mirror_{$NAME} = new CodeMirror.fromTextArea("{$NAME}_id", 
  {literal}{{/literal}
    height: "{$height}px",
    path:   "{$g_root_url}/global/codemirror/js/",
    {if $code_markup == "HTML" || $code_markup == "XML"}
      parserfile: ["parsexml.js"],
      stylesheet: "{$g_root_url}/global/codemirror/css/xmlcolors.css"
    {elseif $code_markup == "CSS"}
      parserfile: ["parsecss.js"],
      stylesheet: "{$g_root_url}/global/codemirror/css/csscolors.css"
    {elseif $code_markup == "JavaScript"}  
      parserfile: ["tokenizejavascript.js", "parsejavascript.js"],
      stylesheet: "{$g_root_url}/global/codemirror/css/jscolors.css"
    {/if}
  {literal}});{/literal}
</script>

{if $comments}
  <div class="cf_field_comments">{$comments}</div>
{/if}