Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add table wrapper as scroll container for readonly tables
This fixes the table width and scroll behaviour in readonly mode.

Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- authored and backportbot-nextcloud[bot] committed Mar 27, 2023
commit 938a9541f26278dc1b77c244f1ddc44d996eb7d0
6 changes: 5 additions & 1 deletion src/nodes/Table/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,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