{% load i18n %}
{% load cradmin_legacy_icon_tags %}

<div cradmin-legacy-acemarkdown="{{ directiveconfig }}" class="cradmin-acemarkdown cradmin-div-styled-as-textarea">
    <div class="btn-toolbar" role="toolbar">
        {% block toolbar %}
            {% block headerbuttons %}
                <div class="btn-group">
                    <a class="btn btn-default" cradmin-legacy-acemarkdown-tool="{
                            pre: '\n\n# ', post: '\n'}">
                        <span class="{% cradmin_icon 'h1' %}"></span>
                        <span class="sr-only">{% trans "Heading 1" %}</span>
                    </a>
                    <a class="btn btn-default" cradmin-legacy-acemarkdown-tool="{
                            pre: '\n\n## ', post: '\n'}">
                        <span class="{% cradmin_icon 'h2' %}"></span>
                        <span class="sr-only">{% trans "Heading 2" %}</span>
                    </a>
                    <a class="btn btn-default" cradmin-legacy-acemarkdown-tool="{
                            pre: '\n\n### ', post: '\n'}">
                        <span class="{% cradmin_icon 'h3' %}"></span>
                        <span class="sr-only">{% trans "Heading 3" %}</span>
                    </a>
                </div>
            {% endblock headerbuttons %}
            {% block inlinestylesbuttons %}
                <div class="btn-group">
                    <a class="btn btn-default" cradmin-legacy-acemarkdown-tool="{
                            pre: '**', post: '**', emptyText: '{% trans "Text here" %}'}">
                        <span class="{% cradmin_icon 'bold' %}"></span>
                        <span class="sr-only">{% trans "Bold" %}</span>
                    </a>
                    <a class="btn btn-default" cradmin-legacy-acemarkdown-tool="{
                            pre: '_', post: '_'}">
                        <span class="{% cradmin_icon 'italic' %}"></span>
                        <span class="sr-only">{% trans "Italic" %}</span>
                    </a>
                    <a class="btn btn-default"
                            cradmin-legacy-acemarkdown-link="{
                                help: '{% trans "Write the URL in the field below. Make sure you include the http:// or https:// part of the URL." %}',
                                emptyText: '{% trans "Link title here" %}'}">
                        <span class="{% cradmin_icon 'link' %}"></span>
                        <span class="sr-only">{% trans "Link" %}</span>
                    </a>
                </div>
            {% endblock inlinestylesbuttons %}
            {% block listbuttons %}
                <div class="btn-group">
                    <a class="btn btn-default" cradmin-legacy-acemarkdown-tool="{
                            pre: '\n* ', post: '\n'}">
                        <span class="{% cradmin_icon 'list-ul' %}"></span>
                        <span class="sr-only">{% trans "Bulletlist" %}</span>
                    </a>
                    <a class="btn btn-default" cradmin-legacy-acemarkdown-tool="{
                            pre: '\n1. ', post: '\n'}">
                        <span class="{% cradmin_icon 'list-ol' %}"></span>
                        <span class="sr-only">{% trans "Numbered list" %}</span>
                    </a>
                </div>
            {% endblock listbuttons %}
            {% block codebuttons %}
                <div class="btn-group">
                    <a class="btn btn-default" cradmin-legacy-acemarkdown-tool="{
                                pre: '``` ', post: '\n\n```',
                                emptyText: '{% trans "programminglanguage" %}'
                            }">
                        <span class="{% cradmin_icon 'codeblock' %}"></span>
                        <span class="sr-only">{% trans "Code block" %}</span>
                    </a>
                </div>
            {% endblock codebuttons %}
        {% endblock toolbar %}
    </div>
    <div cradmin-legacy-acemarkdown-editor></div>
    {% include "django/forms/widgets/textarea.html" %}
</div>
