templates/default/components/atoms/paragraph/paragraph.html.twig line 1

Open in your IDE?
  1. {% set content = text|default('')|raw %}
  2. {% if atomicType is defined %}
  3. {% if text is iterable %}
  4. {% set content = renderRichText(text) %}
  5. {% else %}
  6. {% set content = text|markdown_to_html %}
  7. {% endif %}
  8. {% endif %}
  9. <{% if atomicType is defined %}div{% else %}p{% endif %} class="paragraph {{ class|default }}{% if column|default %} paragraph--column-{{ column }}{% endif %}">
  10. {% if maxLength is defined and maxLength > 0 and content|striptags|length > maxLength %}
  11. {% set content = content|striptags|u.truncate(maxLength, '...') %}
  12. {% endif %}
  13. {{ content|raw }}
  14. </{% if atomicType is defined %}div{% else %}p{% endif %}>