In a twig file, I use {{file.html()|raw}} and I obtain something like <p alt="">mytext</p>.
Is it possible to obtain only the text mytext ?
Themes & Styling
Solved by Karmalakas View solution
Try striptags
TWIG
{{file.html()|raw|striptags}}
Log in to reply.
Suggested topics
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 1 | 165 | 2 weeks ago | ||
| 4 | 288 | 1 month ago | ||
| 4 | 615 | 3 months ago | ||
| 3 | 320 | 3 months ago | ||
| 11 | 746 | 4 months ago |