{% extends "EzPublishCoreBundle::content_fields.html.twig" %}

{% block ezxmltext_field %}
    {% spaceless %}
        {% set field_value = field.value.xml|xmltext_to_html5  %}
        {% if parameters.truncate is defined and field_value != null %}
            {% set field_value = field_value|striptags[:parameters.truncate]~'...' %}
        {% endif %}
        {{ block( 'simple_block_field' ) }}
    {% endspaceless %}
{% endblock %}

{% block simple_block_field %}
    {% spaceless %}
        {% set field_value = field_value|default( field.value ) %}
        {{ field_value|raw }}
    {% endspaceless %}
{% endblock %}