- Issue created by @bwoods
- πΊπΈUnited States bwoods
I was able to get this to work by using the processed_text formatter. Here is a code sample that I used in timeline-block.html.twig:
{% for key,timeline in timeline_data %} {% set tl_description = { '#type': 'processed_text', '#text': timeline.description, '#format': timeline.description_format, } %} <div class="timeline-2-item"> <div class="timeline-2-card timeline-2-bg-base text-white border-0"> {% if timeline.time %} <div class="timeline-2-card-header py-2 timeline-2-bg-main rounded-0 border-0"> {{ timeline.time|raw }} </div> {% endif %} <div class="timeline-2-card-body"> {% if timeline.title %} <h3 class="timeline-2-card-title">{{ timeline.title|raw }}</h3> {% endif %} <div class="timeline-2-card-text">{{ tl_description }}</div> </div> </div> </div> {% endfor %}
This appears to work successfully. From what I understand, the raw filter should be avoided if possible.
I have made a copy of this file and included it directly in my theme, but I could make a patch (and include an update for all layout options, if that would be helpful.