###~css

.toolbar {
    border: 1px solid #ccc;
}
.text {
    border: 1px solid #ccc;
    height: 400px;
}
#div3{
    margin-top: 50px
}
 
###~vue
<template>
  <div class="hello">
    
    <!-- <button @click="gettwo()">点击</button> -->
    <div >
    </div>

    <div style="padding: 5px 0; color: #ccc">中间隔离带</div>

    <div > <!--可使用 min-height 实现编辑区域自动增加高度-->
        <p>请输入内容</p>
    </div>

    <div >
        <p>第二个 demo(常规)</p>
    </div>
  </div>
</template>

<script>

import {shuchu} from '../assets/get'
import E from 'wangeditor'
import '../assets/editor.css'

export default {
  // data () {
  //   return {
  //   }
  // },
  // methods: {
  //   gettwo(){
  //     shuchu();
  //   }
  // },
  mounted(){
     var editor1 = new E('#div1', '#div2')  // 两个参数也可以传入 elem 对象,class 选择器
    editor1.create()

    var editor2 = new E('#div3')
    editor2.create()
  }
}
</script>


效果图:
富文本编辑器--页面中两个编辑器以及菜单和编辑器区域分开

 

 

相关文章:

猜你喜欢
  • 2022-01-01
  • 2021-10-21
  • 2021-11-22
相关资源
相似解决方案