A markdown parser for mpvue.
Basic render:
Code highlight and list:
Table and tasks lists:
- Easy to use
- Supports code highlight, tasks list, etc.
- Powered by native component(
rich-text
) - Better Performance
npm:
npm i --save mpvue-markdown-parser
or yarn
yarn add mpvue-markdown-parser
<template>
<rich-text :nodes="nodes"></rich-text>
</template>
<script>
import 'prismjs/themes/prism.css';
import MpvueMarkdownParser from 'mpvue-markdown-parser';
import 'mpvue-markdown-parser/dist/index.css';
export default {
data () {
return {
nodes: MpvueMarkdownParser('# your markdown text')
}
}
}
</script>
MIT