Skip to content

dandelion1000/mention-editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.