<link rel="stylesheet" type="text/css" href="public/js/markitup/skins/markitup/style.css" />
<link rel="stylesheet" type="text/css" href="public/js/markitup/sets/texy/style.css" />
<script type="text/javascript" src="public/js/jQuery/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="public/js/markitup/jquery.markitup.js"></script>
<script type="text/javascript" src="public/js/markitup/sets/texy/set.js"></script>
<style>
    .markItUp {
        width: 70%;
    }
    .markItUpEditor {
        font: unset;
        font-size: 160%;
        padding: unset;
        width: 100%;
    }
</style>
{ifset $errors}
<div class="ink-alert basic error" role="alert">
  {reset( $errors )[0]}
</div>
{/ifset}
{import forms.html}
<form action="{$action}" method="POST" enctype="multipart/form-data" class="ink-form">
  <div class="control-group">
    <label for="snippet_name">{_'name'}</label>
    <div class="control">
      {include input, name => 'snippet[name]', value => ($snippet->name), maxlength => 100, required => true, autofocus => true }
    </div>
  </div>
  <div class="control-group">
    <label for="page_language">{_'language'}</label>
    <div class="control">
      {include select, name => 'snippet[language]', value => ($snippet->language), options => languageNames()}
    </div>
  </div>
  <div class="control-group">
    <label for="snippet_content">{_'content'}</label>
    <div class="control">
      {include textarea, name => 'snippet[content]', required => true, value => ($snippet->content)}
    </div>
  </div>
  {include input, name => 'save', value => ( 'save'|translate ), 'type' => 'submit', class => 'ink-button green' }
  {include input, name => 'continue', value => ( 'save_and_continue'|translate ), 'type' => 'submit', class => 'ink-button green'} {_'or'} <a href="{=BASE_URL}snippet/list">{('cancel'|translate|lower)}</a>
</form>
<script language="javascript">
 $(document).ready(function()	{
   $('#snippet_content').markItUp(myTexySettings);
 });
</script>
