美文网首页
vue项目安装mavon-editor markdown编辑器插

vue项目安装mavon-editor markdown编辑器插

作者: EricHedgedog | 来源:发表于2018-05-07 15:53 被阅读0次
    1. 在项目根目录安装markdown 插件 mavon-editor
    $ npm install mavon-editor --save
    
    1. 在项目入口文件main.js 引入 mavon-editor
    import mavonEditor from 'mavon-editor'
    import 'mavon-editor/dist/css/index.css'
    
    Vue.use(mavonEditor)
    
    1. 在需要的页面中使用
    <template>
      <div id="main">
          <mavon-editor v-model="value"/>
      </div>
    </template>
    
    <script>
    export default {
      data () {
        return {
          value: ''
        }
      }
    }
    </script>
    
    image.png

    相关文章

      网友评论

          本文标题:vue项目安装mavon-editor markdown编辑器插

          本文链接:https://www.haomeiwen.com/subject/dkdmrftx.html