text-format-wrapper.html.twig 707 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{#
/**
 * @file
 * Default theme implementation for a text format-enabled form element.
 *
 * Available variables:
 * - children: Text format element children.
 * - description: Text format element description.
 * - attributes: HTML attributes for the containing element.
 * - aria_description: Flag for whether or not an ARIA description has been
 *   added to the description container.
 *
 * @see template_preprocess_text_format_wrapper()
 */
#}
<div class="text-format-wrapper form-item">
  {{ children }}
  {% if description %}
    {%
      set classes = [
        aria_description ? 'description',
      ]
    %}
    <div{{ attributes.addClass(classes) }}>{{ description }}</div>
  {% endif %}
</div>