1.0.2 • Published 3 years ago
tony-tinymce-editor v1.0.2
基于Tinymce的富文本编辑器
tony-tinymce-editor
安装
npm i tony-tinymce-editor
或
yarn add tony-tinymce-editor
使用
- index.html 部分
<script src="https://oss.sh123.cn/libs/tinymce/tinymce.min.js"></script>
template 部分
<template> <div> ... <!-- 富文本编辑器 --> <tinymce-editor :open="componentTinymceEditor.open" :content="componentTinymceEditor.content" :config="componentTinymceEditor.config" @result="componentTinymceEditor.result" /> ... </div> </template>
javascript 部分
// 组件:Excel导出 import tinymceEditor from 'tony-tinymce-editor' export default { components: { tinymceEditor }, data () { return { // 组件:富文本编辑器 componentTinymceEditor: { content: '', config: { img_upload: { // url: API_DEMO.oss.upload, // token: STORAGE.GET('TOK'), maxSize: 2, allowType: ['gif'] } }, result: ( _data )=> { console.log(_data) } } } } }