Long time without a question, but today I wonder if there is a way to prevent editors to use HTML in textarea (and text) fields but keep available markdown?
You could use ->markdown() instead of ->kirbytext()
<?= $page->text()->markdown() ?>
Edit: Nevermind, that still parses HTML. You could teach your editors to escape the HTML but I guess that’s not really what you’re trying to do here. You want to force them to not use it right?
Maybe use a Kirbytext filter, then you don’t have to use it all the time. Wouldn’t work with non-Kirbytext fields…
Anyway, there is no way to prevent editors to enter HTML tags apart from telling them no to, for example in a help text. But if you can’t trust them, you have to get rid of these tags afterwards. Just like you have to escape stuff anyway when outputting your content.