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 ?
Community guidelines
Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.
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 |
|---|---|---|---|---|
| 4 | 197 | 2 months ago | ||
| 3 | 92 | 2 months ago | ||
| 11 | 454 | 3 months ago | ||
| 0 | 47 | 3 months ago | ||
| 5 | 127 | 3 months ago |