Is there an easy way to inject/add classes to the Kirbytext/Markdown output?
I recently adopted the BEM methodology (which I wholeheartedly recommend btw – it made my CSS layout workflow much faster) to structure my SASS/CSS and ideally, if you follow BEM strictly, you're not supposed to style basic selectors or selector chains anymore.
So for example, instead of a raw p tag, I'd like Kirby to output something like this:
<p class="bodytext__p"> … </p>
Ideally I would be able to change what class name is used from one context, i.e. template, to the other.
Is there really no way to achieve that, other than writing my own special wrapper function, that does lots of regular expression parsing and replacing? Doing that seems a bit of over the top to me. "Mit Kanonen auf Spatzen schießen", as I would say in German.
Anything I'm missing here? Some genius hidden technique? Thanks for any info in advance!