blob: a1f4454207d550c0fe411825ec8713b1e54aeaf5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
import { TableCell } from '@tiptap/extension-table-cell'
import { VueNodeViewRenderer } from '@tiptap/vue-2'
import TableCellView from './TableCellView'
export default TableCell.extend({
content: 'inline*',
toMarkdown(state, node) {
state.write(' ')
state.renderInline(node)
state.write(' |')
},
parseHTML() {
return [
{ tag: 'td' },
{ tag: 'th' },
{ tag: 'table thead ~ tbody th', priority: 70 },
{ tag: 'table thead ~ tbody td', priority: 70 },
]
},
addNodeView() {
return VueNodeViewRenderer(TableCellView)
},
})
|