Skip to content

Commit

Permalink
Merge pull request #5148 from nextcloud/fix/gapcursor_table
Browse files Browse the repository at this point in the history
fix(gapcursor): Don't allow gap cursor in tables
  • Loading branch information
mejo- authored Dec 18, 2023
2 parents a8a1fcf + 0388b75 commit 88b8aa4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/nodes/Table/TableCaption.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { Node } from '@tiptap/core'
export default Node.create({
name: 'tableCaption',
content: 'inline*',
allowGapCursor: false,
addAttributes() {
return {}
},
Expand Down
1 change: 1 addition & 0 deletions src/nodes/Table/TableHeadRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import TableRow from './TableRow.js'
export default TableRow.extend({
name: 'tableHeadRow',
content: 'tableHeader*',
allowGapCursor: false,

toMarkdown(state, node) {
state.write('|')
Expand Down
1 change: 1 addition & 0 deletions src/nodes/Table/TableRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { TableRow } from '@tiptap/extension-table-row'

export default TableRow.extend({
content: 'tableCell*',
allowGapCursor: false,

toMarkdown(state, node) {
state.write('|')
Expand Down

0 comments on commit 88b8aa4

Please sign in to comment.