其他分享
首页 > 其他分享> > vue + mavon-editor

vue + mavon-editor

作者:互联网

推荐一个markdown编辑器:mavon-editor

  1. Install mavon-editor (安装)
npm install mavon-editor --save
  1. 全局引入(main.js)
import Vue from 'vue'
import mavonEditor from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'

Vue.use(mavonEditor)
  1. 在组件中引入
<template>
  <div id="app">
    <mavon-editor v-model="content"/>
  </div>
</template>

<script>
export default {
  name: 'App',
  data() {
    return {
      content: ''
    }
  }
}
</script>

<style lang="less">

</style>

image

标签:mavon,vue,Vue,mavonEditor,editor,import,css
来源: https://www.cnblogs.com/yts-helloworld/p/15939244.html