vue-tinymce增加135编辑器支持
一、引入@tinymce/tinymce-vue
import TinymceVue from '@tinymce/tinymce-vue';
二、实例化tinymce并调用135编辑器
注意里面的external_plugins表示引入自定义的135编辑器插件。
<tinymce-vue
api-key="申请一个tinymce的key"
v-model="content"
:init="{
external_plugins: {
'editor135': 'https://cdn.jsdelivr.net/gh/starideas/xyfront/libs/tinymce/plugins/editor135/plugin.js'
fixed_toolbar_container: true,
init_instance_callback: editor => {},
default_link_target: '_blank',
paste_data_images: true, // 设置为允许粘帖图片
automatic_uploads: true,
file_picker_types: 'file image media',
file_picker_callback: filePickerCallback,
images_upload_handler: imagesUploadHandler,
language: 'zh_CN',
theme: 'silver',
plugins: 'editor135 bdmap media ',