{% from "icons.html" import icon %} {# Markdown editor and its preview, shared by every editor (page, inbox note, purpose, filing instructions, team prompt): the server renders the text as it will read, preferences.js shows it (Write, Preview, side by side on a large screen). Without JS: the text alone. - `preview`: address of the preview (POST); '' for none. `{space}` in it stands for the value of the form's `space_field` (the space chosen in the form itself); - `params`: fields always sent with the text (the edited page or note, the kind of document); - `fields`: names of the form's fields sent too, the preview following them (folder, hint…); - `name_field`: the form's file name field, when it decides whether the text is Markdown; - `split`: offer side by side (not in a narrow column). #} {% macro editor(value, rows, preview='', id='text', name='text', label='', params=none, fields='', name_field='', space_field='', split=true, classes='editor', placeholder='', help='', too_long='') -%}
{% if preview %} {% endif %}
{% if preview %} {% endif %}
{% if help %}

{{ help }}

{% endif %}
{%- endmacro %}