/mention-editor

简单的mention编辑器 功能 访问地址: https://dandelion1000.github.io/mention-dist-copy/

Primary LanguageJavaScript

npm 地址:https://www.npmjs.com/package/mentioneditor

install
yarn add mentioneditor
how to use
<template>
  <div>
    <mention-editor :topics="list1"></mention-editor>
  </div>
</template>
<script>
import mentionEditor from 'mentioneditor'
export default {
  components:{
    'mention-editor':mentionEditor
  },
  data(){
    return {
      list1:[
        {
          id:'001',
          text:'话题1'
        },
        {
          id:'002',
          text:'话题2'
        }
      ]
    }
  }
}
</script>
when we need @sb,we just v-bind:sb-list="xxxList" 

图片

when we need mention #some topic,we just v-bind:topics is ok

图片

about paste img

you can also paste the img that copy from local or other net page's . 图片

about paste other content that have style ,I deal with clear all style and at this time content will don't have img although content contains img.