Package Exports
- @mdit-vue/plugin-component
Readme
@mdit-vue/plugin-component
A markdown-it plugin to allow Vue components in markdown.
- Treat vue built-in components and unknown HTML tags as vue components (markdown-it would treat them as inline tags by default).
- Allow vue
@
directive on native HTML tags. - With full tests.
Install
npm i @mdit-vue/plugin-component
Usage
This plugin will only take effects when the html
option of markdown-it is enabled:
import MarkdownIt from 'markdown-it';
import { componentPlugin } from '@mdit-vue/plugin-component';
const md = MarkdownIt({ html: true }).use(componentPlugin);