Skip to content

zk-markdown ​

Markdown turned into HTML on the server, without raw HTML and without dangerous links by default.

Props ​

PropTypeDefaultDescription
textstring|nullnullThe text. Without it, the content of the slot
allowHtmlboolfalseKeep the HTML written in the text: only for text you wrote
classstring|nullnullCSS class(es) merged onto the root element

Undeclared attributes forward to the root element.

Slots ​

SlotDescription
defaultThe Markdown, when there is no text

It uses Str::markdown() of Laravel with html_input set to strip and allow_unsafe_links off. Class hook: markdown. No script.

Examples ​

Basic ​

blade
<x-zk-markdown :text="$post->body" />

Documentation of 3.2.0 , built from c93e21f on 3.2.0 by pipeline #2919741884 on 2026-10-06.