mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-10 05:46:47 +08:00
Merge pull request #4673 from artoscinote/ma_SCI_7238
Make overflowing tables in TinyMCE scrollable [SCI-7238]
This commit is contained in:
commit
6f60a7cd4f
1 changed files with 8 additions and 1 deletions
|
@ -85,6 +85,8 @@
|
||||||
inEditMode() {
|
inEditMode() {
|
||||||
if (this.inEditMode) {
|
if (this.inEditMode) {
|
||||||
this.initTinymce();
|
this.initTinymce();
|
||||||
|
} else {
|
||||||
|
this.wrapTables();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
characterCount() {
|
characterCount() {
|
||||||
|
@ -113,6 +115,8 @@
|
||||||
mounted() {
|
mounted() {
|
||||||
if (this.inEditMode) {
|
if (this.inEditMode) {
|
||||||
this.initTinymce();
|
this.initTinymce();
|
||||||
|
} else {
|
||||||
|
this.wrapTables();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -130,7 +134,7 @@
|
||||||
if (data) {
|
if (data) {
|
||||||
this.$emit('update', data)
|
this.$emit('update', data)
|
||||||
}
|
}
|
||||||
this.$emit('editingDisabled')
|
this.$emit('editingDisabled');
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.active = true;
|
this.active = true;
|
||||||
this.initCharacterCount();
|
this.initCharacterCount();
|
||||||
|
@ -140,6 +144,9 @@
|
||||||
getStaticUrl(name) {
|
getStaticUrl(name) {
|
||||||
return $(`meta[name=\'${name}\']`).attr('content');
|
return $(`meta[name=\'${name}\']`).attr('content');
|
||||||
},
|
},
|
||||||
|
wrapTables() {
|
||||||
|
$(this.$el).find('.tinymce-view table').wrapAll('<div style="overflow: auto"></div>');
|
||||||
|
},
|
||||||
initCharacterCount() {
|
initCharacterCount() {
|
||||||
if (!this.editorInstance()) return;
|
if (!this.editorInstance()) return;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue