Vue-SimpleMDE的使用
1、安装npm install vue-simplemde --save-dev2、在项目的main.js中引入import VueSimplemde from 'vue-simplemde'import 'simplemde/dist/simplemde.min.css'Vue.use(VueSimplemde)3、在Vue组建中使用<template>...
·
1、安装
npm install vue-simplemde --save-dev
2、在项目的main.js中引入
import VueSimplemde from 'vue-simplemde'
import 'simplemde/dist/simplemde.min.css'
Vue.use(VueSimplemde)
3、在Vue组建中使用
<template>
<div class="markdown">
<markdown-editor v-model="content"></markdown-editor>
</div>
</template>
<script>
import markdownEditor from 'vue-simplemde/src/markdown-editor';
export default {
components: { markdownEditor },
data() {
return {
content: '',
configs: {}
};
}
}
</script>
<style scoped>
.markdown{
width: 60%;
margin: 0 auto;
}
</style>
更多推荐
已为社区贡献15条内容
所有评论(0)