{if $CONTEXTPAGE == "edit_submission"}
  <textarea id="{$NAME}_id" name="{$NAME}">{$VALUE}</textarea>
  <script>
  var code_mirror_{$NAME} = new CodeMirror.fromTextArea("{$NAME}_id", 
  {literal}{{/literal}
    height: "{$SIZE_PX}px",
    path:   "{$g_root_url}/global/codemirror/js/",
    readOnly: true,
    {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>
{else}
  {$VALUE|strip_tags}
{/if}