How to get plain text from field after kirbytext

is it possible with kirby alone or with some php to strip html code from a field parsed with kirbytext? like for removing html for the seo meta-description tag?
i want to keep text formated in like bold/italic etc but remove images. keeping text of links but not the link itself.

<b>hello</b> <a href="http:/example.com">world</a>

should be come

hello world

What about strip_tags?

1 Like

Kirby has html::decode(): Removes all html tags and encoded chars from a string.
str::unhtml() does the same.

1 Like

thx @malvese and @texnixe, just what i needed.