在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):ravenq/markdown-it-vue开源软件地址(OpenSource Url):https://github.com/ravenq/markdown-it-vue开源编程语言(OpenSource Language):Vue 58.7%开源软件介绍(OpenSource Introduction):markdown-it-vue
Demo onlinehttp://www.aqcoder.com/markdown Installnpm install markdown-it-vue Running Demoyarn install && yarn dev Supports
Plugin list
internal plugin list:
Optionsuse <markdown-it-vue class="md-body" :content="content" :options="options" /> options: {
markdownIt: {
linkify: true
},
linkAttributes: {
attrs: {
target: '_blank',
rel: 'noopener'
}
}
} more markdown-it options see https://markdown-it.github.io/markdown-it/. amd default plugins options: {
linkAttributes: {
attrs: {
target: '_blank',
rel: 'noopener'
}
},
katex: {
throwOnError: false,
errorColor: '#cc0000'
},
icons: 'font-awesome',
githubToc: {
tocFirstLevel: 2,
tocLastLevel: 3,
tocClassName: 'toc',
anchorLinkSymbol: '',
anchorLinkSpace: false,
anchorClassName: 'anchor',
anchorLinkSymbolClassName: 'octicon octicon-link'
},
mermaid: {
theme: 'default'
},
image: {
hAlign: 'left',
viewer: true
}
} More pluginsit can add your plugin to markdown-it-vue by the this.$refs.myMarkdownItVue.use(MyMarkdownItPlugin) support hilight langPR for you lang wich you want.
image size![image size](https://http://www.aqcoder.com/ravenq-qr.png =50x50)
![image size](https://http://www.aqcoder.com/ravenq-qr.png =x50)
![image size](https://http://www.aqcoder.com/ravenq-qr.png =50x) about echartsuse echarts.simple to reduce the bundle size. markdown-it-vue-lightmarkdown-it-vue-light remove the mermaid chart to reduce the bundle size. for a small bundle size, it better to import the markdown-it-vue-light. Usage<template>
<div>
<markdown-it-vue class="md-body" :content="content" />
</div>
</template>
<script>
import MarkdownItVue from 'markdown-it-vue'
import 'markdown-it-vue/dist/markdown-it-vue.css'
export default {
components: {
MarkdownItVue
},
data() {
return {
content: '# your markdown content'
}
}
}
</script> the light model. <template>
<div>
<markdown-it-vue-light class="md-body" :content="content" />
</div>
</template>
<script>
import MarkdownItVueLight from 'markdown-it-vue/dist/markdown-it-vue-light.umd.min.js'
import 'markdown-it-vue/dist/markdown-it-vue-light.css'
export default {
components: {
MarkdownItVueLight
},
data() {
return {
content: '# your markdown content'
}
}
}
</script> ScreenShotLicense |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论