Skip to content

Commit

Permalink
Merge pull request #3998 from nextcloud/fix/readyonly_table_width
Browse files Browse the repository at this point in the history
Add table wrapper as scroll container for readonly tables
  • Loading branch information
mejo- authored Mar 27, 2023
2 parents 9906a5f + 921c426 commit 99c9c29
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 19 deletions.
4 changes: 2 additions & 2 deletions js/editor.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/editor.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-editors.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-editors.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-files.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-files.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-public.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-text.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-text.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-viewer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-viewer.js.map

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion src/nodes/Table/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,11 @@ export default Table.extend({
},

renderHTML({ HTMLAttributes }) {
return ['table', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]
return [
'div',
{ class: 'table-wrapper', style: 'overflow-x: auto;' },
['table', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0],
]
},

toMarkdown(state, node) {
Expand Down

0 comments on commit 99c9c29

Please sign in to comment.