I am setting up our reports for the first time. We have detailed descriptions of each criteria which I would like to include. But it needs some formating - new lines at a minimum, but also bolding and bullet points etc.
When I enter HTML into the Description of the criteria it gets stripped out. So I thought i could get around that by entering the Description using Markdown. Twig has a cool markdown_to_html apply filter (https://twig.symfony.com/doc/3.x/filters/markdown_to_html.html) but when i add this to the template the build process crashes.
What is the best way of getting formatted text into the Criteria description?
Hi agrogers, good question. It looks like the markdown_to_html filter is part of the MarkdownExtension which is not installed by default in Twig. If you’re looking for more control over the HTML, I’d recommend creating your own asset, especially to help reduce the duplication of needing to copy-paste your criteria description into each criteria. For example, schools that use a common grade scale will often add a legend to the bottom of the page that explains the grade scale values, reducing duplication and saving on space. A template asset will let you have full HTML control over the output. This is one example from a school I work with: