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: a8ce69234e24eae9b0a3aaf9218bcab95b6ce526 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { TableCell } from '@tiptap/extension-table-cell'

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