{# This template defines extra_head and data_editor macros that are selected within content.py based on the item's content type. Both will be passed to the modify.html template. The extra_head macro loads javascript and css files required by the CKEditor. The data_editor macro defines the textarea used by the CKEditor to edit HTML items. #} {% if user.use_html_editor %} {% macro extra_head() %} {#- prevent ckeditor css from making body font-size 12px #} {% endmacro %} {% macro data_editor(form, item_name) %} {{ gen.textarea(form['data_text'], class='ckeditor', rows=form.rows|string, cols=form.cols|string) }} {% endmacro %} {% else %} {% from "modify_binary.html" import data_editor as base_editor with context %} {% macro data_editor(form, item_name) %} {% set textarea_rows = '1' if edit_rows == '0' else edit_rows %} {% set cls = 'moin-edit-content moin-autosize' if edit_rows == '0' else 'moin-edit-content' %} {{ gen.textarea(form['data_text'], rows=textarea_rows|string, class=cls, **kwargs) }} {{ base_editor(form) }}
{% endmacro %} {% endif %}