Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

samgurung's avatar

Spatie laravel markdown add your own classes

Am trying to use the Spatie laravel markdown package to create a blogging site. And I have kind of got it working. I am saving my markdown in a field in a posts table. The markdown renders in my blade view

div class="md:w-2/3  max-w-none text-white over">
		<x-markdown>
        		{!! $post->content !!}
</x-markdown>
</div>

However I am unable to figure out how to inject some extra classes into the rendered markdown.

Any help will be appreicatied

0 likes
0 replies

Please or to participate in this conversation.