|
@@ -11,7 +11,7 @@
|
|
|
<el-button type="text" @click="ImmediateAddition">{{ inputButton }}</el-button>
|
|
|
</div>
|
|
|
<div v-show="edit">
|
|
|
- <el-tooltip effect="dark" content="单击‘编辑’,失去焦点 ‘保存’" placement="bottom">
|
|
|
+ <el-tooltip effect="dark" content="单击‘编辑’" placement="bottom">
|
|
|
<editor v-model="inputValue" :class="'tinymce_'+id" :init="init" @input="changeText" />
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
@@ -32,6 +32,7 @@ import tinymce from 'tinymce/tinymce'
|
|
|
import Editor from '@tinymce/tinymce-vue'
|
|
|
import 'tinymce/themes/silver/theme'
|
|
|
import 'tinymce/icons/default/icons'
|
|
|
+import 'tinymce/plugins/table'
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
@@ -103,15 +104,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- document.body.addEventListener('click', e => {
|
|
|
- if (!document.getElementById(this.id)) {
|
|
|
- return false
|
|
|
- }
|
|
|
- const isContain = document.getElementById(this.id).contains(e.target)
|
|
|
- if (!isContain) {
|
|
|
- document.getElementById(`inputUpload_${this.id}`).click()
|
|
|
- }
|
|
|
- })
|
|
|
+ // 失去焦点保存功能
|
|
|
+ // document.body.addEventListener('click', e => {
|
|
|
+ // if (!document.getElementById(this.id)) {
|
|
|
+ // return false
|
|
|
+ // }
|
|
|
+ // const isContain = document.getElementById(this.id).contains(e.target)
|
|
|
+ // if (!isContain) {
|
|
|
+ // document.getElementById(`inputUpload_${this.id}`).click()
|
|
|
+ // }
|
|
|
+ // })
|
|
|
tinymce.init({ selector: `.tinymce_${this.id}` })
|
|
|
},
|
|
|
methods: {
|