I am making a kind of blog project with Symfony2
.
I create the content of my articles with IvoryCKEditorBundle
and then display them with {{ article.content|raw }}
in Twig.
I want to display on my homepage the first lines of the article: To do this, I need to parse the HTML code and extract strings in it.
How do I extract plain text from HTML, in my Twig template?