{if $CONTEXTPAGE == "edit_submission"}
<div class="cf_code_view">
    <textarea id="{$NAME}_id" name="{$NAME}">kay{$VALUE}</textarea>
    <script>
    var code_mirror_{$NAME} = new CodeMirror.fromTextArea(document.getElementById("{$NAME}_id"), 
    {literal}{{/literal} height: "{$height}px",
        readOnly: true,
    {if $code_markup == "HTML" || $code_markup == "XML"}
        mode: "xml"
    {elseif $code_markup == "CSS"}
        mode: "css"
    {elseif $code_markup == "JavaScript"}
        mode: "javascript"
    {/if}
    {literal}});{/literal}
    </script>
</div>

{else}
  {$VALUE|strip_tags}
{/if}