<commit_before>{#=== OPTIONS ========================================================================================================#}

{% set option = {
    class:     ('form-control ' ~ field.class)|trim,
    height:    field.height|default('300px'),
    label:     field.label,
    required:  field.required|default(false),
    errortext: field.error|default(''),
    info:      field.info|default('info.markdown')
} %}

{#=== INIT ===========================================================================================================#}

{% set attr_text = {
    class:          option.class,
    name:           name,
    id:             key,
    required:       option.required,
    data_errortext: option.errortext,
    style:          (option.height) ? 'height: ' ~ option.height ~ ' !important;' : '',
} %}

{#=== FIELDSET =======================================================================================================#}

{% extends '_base/_fieldset.twig' %}

{% set fieldset = {
    markdown: {
    }
}%}

{% block fieldset %}
    <div class="col-sm-12">
        <label class="control-label">{{ macro.infopop(labelkey, option.info) }}</label>
        <textarea{{ macro.attr(attr_text) }} data-uk-htmleditor="{ markdown: true, height: '{{option.height}}'}">{{ context.content.get(contentkey)|default('') }}</textarea>
    </div>
{% endblock fieldset %}<commit_msg>Cleanup markdown field and use new fieldset definition on it<commit_after>{#=== OPTIONS ========================================================================================================#}

{% set option = {
    class:     ('form-control ' ~ field.class)|trim,
    height:    field.height|default('300px'),
    label:     field.label,
    required:  field.required|default(false),
    errortext: field.error|default(''),
    info:      field.info|default('info.markdown')
} %}

{#=== INIT ===========================================================================================================#}

{% set attr_text = {
    class:          option.class,
    name:           name,
    id:             key,
    required:       option.required,
    data_errortext: option.errortext,
    style:          (option.height) ? 'height: ' ~ option.height ~ ' !important;' : '',
} %}

{#=== FIELDSET =======================================================================================================#}

{% extends '_base/_fieldset.twig' %}

{% block fieldset_type 'markdown' %}

{% block fieldset_label %}
    <label class="col-xs-12">{{ macro.infopop(labelkey, option.info) }}</label>
{% endblock fieldset_label %}

{% block fieldset_controls %}
    <div class="col-xs-12">
        <textarea{{ macro.attr(attr_text) }} data-uk-htmleditor="{ markdown: true, height: '{{option.height}}'}">{{ context.content.get(contentkey)|default('') }}</textarea>
    </div>
{% endblock fieldset_controls %}
{'fraction_non_alphanumeric': 0.3651841556636553, 'fraction_numerical': 0.004169562195969423, 'mean_word_length': 4.159498207885305, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5892486', 'n_tokens_mistral': 843, 'n_tokens_neox': 759, 'n_words': 137}