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;
|
this.text = (this.value && this.value.text) ? this.value.text : this.text;
|
||||||
if (this.value.open) this.modalBox = true;
|
if (this.value.open) this.modalBox = true;
|
||||||
console.log('mounted textarea');
|
console.log('mounted textarea');
|
||||||
this.$emit('input',this.value);
|
this.$emit('input', this.value);
|
||||||
|
|
||||||
},
|
},
|
||||||
data: function () {
|
data: function () {
|
||||||
@@ -58,11 +58,17 @@ export default {
|
|||||||
modalBox: false,
|
modalBox: false,
|
||||||
text: '',
|
text: '',
|
||||||
name: 'core_section_textarea',
|
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: {
|
watch: {
|
||||||
modalBox: function() {
|
modalBox: function () {
|
||||||
if (this.modalBox) {
|
if (this.modalBox) {
|
||||||
document.addEventListener('focusin', (e) => {
|
document.addEventListener('focusin', (e) => {
|
||||||
if (e.target.closest(".tox-tinymce-aux, .moxman-window, .tam-assetmanager-root") !== null) {
|
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: {
|
computed: {
|
||||||
ctext: function () {
|
ctext: function () {
|
||||||
return this.value.text?this.value.text.replace(/<(?:.|\n)*?>/gm, ''):'';
|
return this.value.text ? this.value.text.replace(/<(?:.|\n)*?>/gm, '') : '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ export default {
|
|||||||
width: '100%',
|
width: '100%',
|
||||||
selector: "textarea.wysiwyg",
|
selector: "textarea.wysiwyg",
|
||||||
language: "pl",
|
language: "pl",
|
||||||
language_url:'https://www.magico.pl/assets/js/tinymce/langs/pl.js',
|
language_url: 'https://www.magico.pl/assets/js/tinymce/langs/pl.js',
|
||||||
forced_root_block: "p",
|
forced_root_block: "p",
|
||||||
entity_encoding: 'named',
|
entity_encoding: 'named',
|
||||||
entities: '160,nbsp,38,amp,60,lt,62,gt',
|
entities: '160,nbsp,38,amp,60,lt,62,gt',
|
||||||
@@ -106,10 +106,11 @@ export default {
|
|||||||
valid_styles: {
|
valid_styles: {
|
||||||
'*': 'display, margin, float, margin-left, margin-right, margin-top, margin-bottom, padding-left, padding-right, padding-top, padding-bottom, text-decoration, border,font-size,color,background,background-color,line-height,text-align,list-style-type, border-radius',
|
'*': 'display, margin, float, margin-left, margin-right, margin-top, margin-bottom, padding-left, padding-right, padding-top, padding-bottom, text-decoration, border,font-size,color,background,background-color,line-height,text-align,list-style-type, border-radius',
|
||||||
},
|
},
|
||||||
plugins: ['advlist', 'autolink', 'lists', 'link', 'image', 'print', 'hr', 'anchor', 'media', 'pagebreak' ,'searchreplace', 'wordcount', 'visualblocks', 'visualchars', 'code' ,'insertdatetime', 'nonbreaking', 'save', 'table', 'contextmenu', 'directionality' ,'emoticons', 'paste', 'textcolor', 'textpattern', 'codesample', 'charmap', 'autoresize'],
|
plugins: ['advlist', 'autolink', 'lists', 'link', 'image', 'print', 'hr', 'anchor', 'media', 'pagebreak', 'searchreplace', 'wordcount', 'visualblocks', 'visualchars', 'code', 'insertdatetime', 'nonbreaking', 'save', 'table', 'contextmenu', 'directionality', 'emoticons', 'paste', 'textcolor', 'textpattern', 'codesample', 'charmap', 'autoresize'],
|
||||||
removed_menuitems: 'newdocument',
|
removed_menuitems: 'newdocument',
|
||||||
toolbarxx: "undo redo | bold italic | bullist numlist outdent indent | alignleft aligncenter alignright alignjustify | link image forecolor backcolor",
|
toolbarxx: "undo redo | bold italic | bullist numlist outdent indent | alignleft aligncenter alignright alignjustify | link image forecolor backcolor",
|
||||||
toolbar1: 'undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | media | forecolor backcolor',
|
toolbar1: 'undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | media | forecolor backcolor',
|
||||||
toolbar2: '',
|
toolbar2: '',
|
||||||
menubar:true,
|
menubar: true,
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user