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

Table.js « nodes « src - github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 02441aacf9175fb2625518be22e8c9a6c62f0f92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { Table } from '@tiptap/extension-table'
import { mergeAttributes } from '@tiptap/core'

export default Table.extend({
	content: 'tableHead tableBody',

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

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

})