vue-markdown-render

A simple, lightweight markdown-it wrapper for Vue written in pure typescript.
5,081,259 138
Install
npm install vue-markdown-render
Latest Version:3.0.0
Vue:3
Older releases:2
License:MIT
Last Updated:Oct 25, 2026
Links: GitHub  ·  npm
Maintainer: patcher56

vue-markdown-render

vue-markdown-render is a simple and lightweight wrapper for markdown-it with full TypeScript support.

Usage

<template>
  <div>
    <vue-markdown :source="src" />
  </div>
</template>

<script lang="ts">
import VueMarkdown from 'vue-markdown-render'

export default defineComponent({
  name: 'MyComponent',
  components: {
    VueMarkdown
  },
  setup(props, ctx) {
    const src = ref('# header')

    return {
      src
    }
  }
})
</script>

Options

markdown-it options can be passed as an object into the VueMarkdown component:

 <vue-markdown :source="src" :options="options" />

Plugins

markdown-it compatible simple plugins can be passed as an array into the VueMarkdown component. Example using MarkdownItAnchor

<template>
  <vue-markdown :source="markdown" :plugins="plugins" />
</template>

<script setup>
import VueMarkdown from 'vue-markdown-render'
import MarkdownItAnchor from 'markdown-it-anchor';

const plugins = [MarkdownItAnchor];
</script>

Migrating to v3

This package uses markdown-it v15. If you're upgrading from v2:

  • Browser usage remains supported. For Node.js environments, markdown-it's entities dependency declares a minimum of Node.js 20.19
  • Remove @types/markdown-it if it was installed for this package
  • With options.linkify: true, bare domains such as example.com are no longer linked by default. URLs with a protocol such as https://example.com still work. To restore bare-domain linking, pass a plugin that calls md.linkify.set({ fuzzyLink: true })
  • Use plugins compatible with markdown-it v15.X. Internal imports such as markdown-it/lib/* are no longer available; plugin authors can use the static classes exposed by MarkdownIt, such as MarkdownIt.Token

Related Packages

vue-markup

markdown + support components for Vue.js

17,321 0
vue-markdown-it

A Vue.js wrapper around markdown-it, a powerful markdown renderer

11,782
markdown-it-vuepress-code-snippet-enhanced

Easily import code snippets for Vuepress

1,735
top-editor

A markdown editor

778 6
mavon-editor

Vue markdown editor

556,330 6,562

Version History

Version Released Vue License
3.0.0 ^3.3.4 MIT
2.3.1 ^3.3.4 MIT
2.3.0 ^3.3.4 MIT
2.2.1 ^3.3.4 MIT
2.2.0 ^3.3.4 MIT