{% extends "bee_django_user/base.html" %}
{% load static %}
{% load bootstrap3 %}
{% block content %}
    {% include 'bee_django_user/logo.html' %}
    {% include 'bee_django_user/nav.html' %}
    {% include 'bee_django_user/messages.html' %}
    <form method="post">
        {% csrf_token %}
        {% bootstrap_form form %}
        {% bootstrap_button '提交' %}
    </form>
{% endblock %}


{% block scripts %}
    <script>
        {#        var editor;#}
        {#        $(document).ready(function () {#}
        {#            var E = window.wangEditor;#}
        {#            var editor = new E('#editor');#}
        {#            var $context = $('#id_context');#}
        {##}
        {#            editor.customConfig.onchange = function (html) {#}
        {#                // 监控变化，同步更新到 textarea#}
        {#                $context.val(html)#}
        {#            };#}
        {#            editor.create();#}
        {#            // 初始化 textarea 的值#}
        {#            var context = $("#edit_context").html();#}
        {#            editor.txt.html(context);#}
        {#            $context.val(context);#}

        {#        });#}
    </script>
{% endblock %}