vue2.0环境
1、安装
npm install --save "@tinymce/tinymce-vue@^3"
npm install tinymce -S
2、将node_modules文件夹中tinymce文件夹复制到public/static 下
3、具体代码参考一下文件,注意路径参照自己的写,zh-CH文件见http://tinymce.ax-z.cn/static/tiny/langs/zh_CN.js
<template>
<div class='tinymce'>
<h1>tinymce</h1>
<editor id='tinymce' v-model='tinymceHtml' :init='init'></editor>
<!-- <div v-html='tinymceHtml'></div>-->
</div>
</template>
<script>
import tinymce from 'tinymce/tinymce'
import 'tinymce/themes/silver/theme'
import Editor from '@tinymce/tinymce-vue'
import 'tinymce/plugins/image'
import 'tinymce/plugins/link'