{*
Parameters:
  $content: The initial value for textarea
  $issue_id: The issue id
  $id: The id attribute to textarea
  $name: The name attribute to textarea (defaults to value of id)
  $rows: The rows attribute to textarea
  $cols: The cols attribute to textarea
  $tabindex: The tabindex attribute to textarea
  $style: The style attribute to textarea
*}

<a class="white_link" href="javascript:void(null);"
   onClick="Eventum.hidePreview('#{$id}', '#preview')">{t}[Write]{/t}</a>
<a class="white_link" href="javascript:void(null);"
   onClick="Eventum.showPreview('#{$id}', '#preview', { issue_id: {$issue_id|intval|default:''} })">{t}[Preview]{/t}</a>
<a class="white_link" href="https://commonmark.org/help/" target="_blank">{t}[Markdown Help]{/t}</a>
<br>
<textarea
  id="{$id}"
  name="{$name|default:$id}"
  rows="{$rows|default:''}"
  cols="{$cols|default:''}"
  tabindex="{$tabindex|default:''}"
  style="{$style|default:''}"
>{$content|escape:"html"}</textarea>

{include file="error_icon.tpl.html" field="$id"}

<div id="preview" style="width: 97%"></div>
