filemamanger concept

This commit is contained in:
2022-07-15 14:51:30 +02:00
parent 436d2dc3b9
commit 1055263eaa
2 changed files with 15 additions and 8 deletions

View File

@@ -44,7 +44,7 @@ export default {
this.text = (this.value && this.value.text) ? this.value.text : this.text;
if (this.value.open) this.modalBox = true;
console.log('mounted textarea');
this.$emit('input',this.value);
this.$emit('input', this.value);
},
data: function () {
@@ -58,11 +58,17 @@ export default {
modalBox: false,
text: '',
name: 'core_section_textarea',
vtinymce: tinymceConfig,
vtinymce: Object.assign(tinymceConfig, {
file_picker_callback: (callback, value, meta) => {
if (this.$filemanager) {
this.$filemanager.fileChooser(callback, value, meta)
}
}
}),
}
},
watch: {
modalBox: function() {
modalBox: function () {
if (this.modalBox) {
document.addEventListener('focusin', (e) => {
if (e.target.closest(".tox-tinymce-aux, .moxman-window, .tam-assetmanager-root") !== null) {
@@ -70,12 +76,12 @@ export default {
}
});
}
console.log('focus');
console.log('focus');
},
},
computed: {
ctext: function () {
return this.value.text?this.value.text.replace(/<(?:.|\n)*?>/gm, ''):'';
return this.value.text ? this.value.text.replace(/<(?:.|\n)*?>/gm, '') : '';
}
},
methods: {