{% extends "base/main_base.html" %}

{% set active_page ='page' %}

{% block pagehead %}
<title>{{active_page.capitalize()}}</title>
<style>
  .hidden{
    display: none;
  }
  .show{
    display: inline-block;
  }
</style>

{% endblock %}

{% block content %}
{%include 'page/nav.html'%}

<div class="container">


<form action="{{url_for('{}.check_pagecontent'.format(module_name))}}" method="POST">
    <div class="field">
      {{ form.content.label }} <br>
      <div class="input-group mb-3">
          {{ form.content }}
      </div>
    </div>

    <input type="hidden" name="csrf_token" value="{{csrf_token()}}">
    <input type="submit" class="btn btn-info" value="submit">
</form>

</div>

<script type="text/javascript" src="{{ url_for('static', filename='tinymce/tinymce.min.js') }}"></script>
<script type="text/javascript">
    tinymce.init({
        selector: '#content',
        plugins: [
            'advlist autolink link image imagetools lists charmap print preview hr anchor pagebreak spellchecker',
            'searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking',
            'save table contextmenu directionality template paste textcolor codesample'
        ],
        imagetools_toolbar: "rotateleft rotateright | flipv fliph | editimage imageoptions",
        toolbar: 'insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media fullpage | forecolor backcolor emoticons | codesample',
        images_upload_url: '',
        automatic_uploads: true,
        images_reuse_filename: false,
        images_upload_base_path: '/static/uploads',
        codesample_languages: [
            { text: 'HTML/XML', value: 'markup' },
            { text: 'JavaScript', value: 'javascript' },
            { text: 'CSS', value: 'css' },
            { text: 'Processing', value: 'processing' },
            { text: 'Python', value: 'python' }
        ],
        width: "100%",
    });
</script>
{% endblock %}