vue-markdown-render
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

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">

TypeScript

If you are using typescript, you have to add the @types/markdown-it to your dev dependencies.

npm install @types/markdown-it --save-dev

Keywords

none

Install

npm i vue-markdown-render

DownloadsWeekly Downloads

3,126

Version

2.0.1

License

MIT

Unpacked Size

40 kB

Total Files

19

Last publish

Collaborators

  • patcher56