{%- block ckeditor_widget -%}
    <textarea {{ block('widget_attributes') }} {% if form.vars.required %}data-required="required"{% endif %}>{{ value }}</textarea>
    {% if ckeditor is defined %}
        <script type="text/javascript">
            document.addEventListener("DOMContentLoaded", function () {
                CKEDITOR.replace('{{ form.vars.id }}', {{ ckeditor.config|json_encode|raw }});
            }, false);
        </script>
    {% endif %}
{%- endblock -%}
