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 |
|---|---|---|---|---|
| 3 | 251 | 2 weeks ago | ||
| 5 | 317 | 3 weeks ago | ||
| 1 | 310 | 4 weeks ago | ||
| 1 | 348 | 1 month ago | ||
| 4 | 474 | 2 months ago |