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

TableBody.js « nodes « src - github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 529b6e54b8c1dd0ae72ad0496865d4b7ee7f535e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { Node, mergeAttributes } from '@tiptap/core'

export default Node.create({
	name: 'tableBody',
	content: 'tableRow*',
	tableRole: 'body',

	addOptions() {
		return {
			HTMLAttributes: {},
		}
	},

	renderHTML({ HTMLAttributes }) {
		return ['tbody', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]
	},

	toMarkdown(state, node) {
		state.renderContent(node)
	},

})