UNPKG

@rtdui/editor

Version:

React rich text editor based on tiptap

23 lines (20 loc) 505 B
'use client'; import { Table } from '@tiptap/extension-table'; import { Plugin } from '@tiptap/pm/state'; const CustomTable = Table.extend({ addProseMirrorPlugins() { const { View, cellMinWidth } = this.options; return [ ...this.parent?.() ?? [], new Plugin({ props: { nodeViews: { [this.name]: (node, view) => new View(node, cellMinWidth, view) } } }) ]; } }); export { CustomTable }; //# sourceMappingURL=table.mjs.map