Inject markup in kirbytext for links


My code is this:

<?php echo $titel ?>

<?= page('wichtige_informationen/notfall')->text()->kt() ?>

I would like to change the <a> Tags in this specific case. Inside the text rendered here are often links. And those links I would like to be

<a href="..." class="link-dark" >...</a>

Of course, Kirby renders this without any class-selectors. Is there any way I can influence the generated HTML?

I found nothing in or the forum.

Thanks in advance!

You can add the class either to the link tags themselven on input in the field

(link: text: Kirby class="some-class")

Or you can use a kirbytags:after hook to manipulate the output at render time: