v-markdown
Updated on Sep 5, 2025 1 minutes to readThe v-markdown directive adds automatic Markdown rendering to an element. It takes a string with Markdown syntax and replaces the element’s content with the rendered HTML.
• Example
<div v-markdown="'# Title\nSome *italic* text.'"></div>
<!-- Result:
<h1>Title</h1>
<p>Some <em>italic</em> text.</p>
-->
🔽 Show more
Modifiers
| Modifier | Description |
|---|---|
| target-blank | Opens non-anchor links in a new browser tab. |
Modifier Details
Target blank
Use the target-blank modifier to open all non-anchor links in a new browser tab. The directive adds target="_blank" and rel="noopener noreferrer" to links whose href does not start with #. Anchor links remain unchanged.
<div v-markdown.target-blank="markdownContent"></div>
🔽 Show more