美文网首页
使用Vue-SimpleMDE 编辑器

使用Vue-SimpleMDE 编辑器

作者: 洋__ | 来源:发表于2017-03-31 18:54 被阅读1143次

    girhub地址 https://github.com/F-loat/vue-simplemde.git

    使用步骤

    1. 进入项目目录,安装插件依赖
    npm install vue-simplemde --save
    
    1. 在main.js引入
    import VueSimplemde from 'vue-simplemde'
    Vue.use(VueSimplemde)
    
    1. 编辑vue文件
    <template>
        <markdown-editor v-model="content" ref="markdownEditor"></markdown-editor>
    </template>
    <script>
        import { markdownEditor } from 'vue-simplemde'
        // 基础用法
    export default {
      components: {
        markdownEditor
      },
      data () {
        return {
          content: '',
          configs: {
            spellChecker: false // 禁用拼写检查
          }
        }
      }
    }
    </script>
    

    4.运行如下

    Paste_Image.png
    1. 整合demo地址
      https://github.com/ssdpj/mk/tree/vue-admine

    相关文章

      网友评论

          本文标题:使用Vue-SimpleMDE 编辑器

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