[ckeditor][markdown] introduce twig filter chill_markdown_to_html

This commit is contained in:
2021-03-22 17:32:57 +01:00
parent f619171120
commit 527b658ca0
5 changed files with 164 additions and 11 deletions

View File

@@ -48,11 +48,9 @@ This view should receive those arguments:
</figure>
{#<p><blockquote>{{ person.memo|nl2br }}</blockquote></p>#}
<div class="chill-user-quote snippet-markdown">
<div class="chill-user-quote">
{{ person.memo|chill_markdown_to_html }}
</div>
{% apply markdown_to_html %}
{{ person.memo }}
{% endapply %}<br>
</div>
{% endif %}
@@ -214,7 +212,7 @@ This view should receive those arguments:
{%- if chill_person.fields.email == 'visible' -%}
<dl>
<dt>{{ 'Email'|trans }}&nbsp;:</dt>
<dd>{% if person.email is not empty %}<blockquote class="chill-user-quote">{{ person.email|nl2br }}</blockquote>{% else %}<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>{% endif %}</dd>
<dd>{% if person.email is not empty %}<a href="mailto:{{ person.email|escape('html_attr') }}">{{ person.email }}</a>{% else %}<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>{% endif %}</dd>
</dl>
{%- endif -%}
{%- if chill_person.fields.phonenumber == 'visible' -%}
@@ -232,7 +230,15 @@ This view should receive those arguments:
{%- if chill_person.fields.contact_info == 'visible' -%}
<dl>
<dt>{{ 'Notes on contact information'|trans }}&nbsp;:</dt>
<dd>{% if person.contactInfo is not empty %}{{ person.contactInfo|nl2br }}{% else %}<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>{% endif %}</dd>
<dd>
{% if person.contactInfo is not empty %}
<div class="chill-user-quote">
{{ person.contactInfo|chill_markdown_to_html }}
</div>
{% else %}
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
{% endif %}
</dd>
</dl>
{%- endif -%}