filemamanger concept
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user