开源软件名称(OpenSource Name):miaolz123/vue-markdown开源软件地址(OpenSource Url):https://github.com/miaolz123/vue-markdown开源编程语言(OpenSource Language):JavaScript 45.7%开源软件介绍(OpenSource Introduction):vue-markdown
A Powerful and Highspeed Markdown Parser for Vue. Quick start: Supported Markdown Syntax:
ExampleInstallationBrowser globals
<body>
<vue-markdown>i am a ~~tast~~ **test**.</vue-markdown>
</body>
<script src="path/to/vue.js"></script>
<script src="path/to/vue-markdown.js"></script>
<script>
Vue.use(VueMarkdown);
var vm = new Vue({
el: "body"
});
</script> NPM$ npm install --save vue-markdown Yarn$ yarn add vue-markdown --save CommonJSvar VueMarkdown = require('vue-markdown');
new Vue({
components: {
'vue-markdown': VueMarkdown
}
}) ES6 (Vue-CLI users)After installing via Yarn or NPM, use the following snippet in the script portion of the Vue component which you wish to render the Markdown. import VueMarkdown from 'vue-markdown'
new Vue({
components: {
VueMarkdown
}
}) Slots<vue-markdown>this is the default slot</vue-markdown> After setting up the middleware in your vue component above, using the embedded markdown is as easy as writing it between the VueMarkdown has a default slot which is used to write the TIP: The default slot only renders once at the beginning, and it will overwrite the prop of Props
全部评论
专题导读
上一篇:guoyunsky/Markdown-Chinese-Demo: 针对中文,演示Markdown的各种语法发布时间:2022-08-17下一篇:alanshaw/markdown-pdf: Markdown to PDF converter发布时间:2022-08-17热门推荐
热门话题
阅读排行榜
|
请发表评论