tinymce-vue富文本框,告别睿智ueditor
tinymce技术选型缘由
工作正好面临富文本框的选择优化,去学习了一下,并且以及实现优化,虽然最后因为稳定性考虑(公司已有完整的百度Ueditor富文本框实现)没有采纳,但还是很适合为从0开发富文本框的场景下提供选择。
vue2.x整合
目录结构
以上为涉及到整合的最少文件
版本依赖
“@tinymce/tinymce-vue”: “^3.2.8” npm安装不过多赘述,引入即可
import Editor from '@tinymce/tinymce-vue'
代码
1.element-dialog处理弹窗遮罩
<el-dialog
:visible.sync="dialogVisible"
:close-on-click-modal="false"
:show-close="false"
append-to-body
center
width="900"
height="200">
<Editor :id="id" :init="init" :disabled="disabled" v-model="myValue"></Editor>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible=false">取 消</el-button>
<el-button type="primary" @click=<