Welcome to mirror list, hosted at ThFree Co, Russian Federation.

TableCell.js « nodes « src - github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 82fa666b3c130c9fb160dee834b0f6c687b6eaef (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
import { TableCell } from '@tiptap/extension-table-cell'

export default TableCell.extend({
	content: 'inline*',

	addAttributes() {
		return {}
	},

	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 },
		]
	},
})