11import TiptapTable from '@tiptap/extension-table' ;
2- import { TableCell } from '@tiptap/extension-table-cell' ;
32import type { TableCellOptions } from '@tiptap/extension-table-cell' ;
43import { TableHeader } from '@tiptap/extension-table-header' ;
54import type { TableHeaderOptions } from '@tiptap/extension-table-header' ;
6- import { TableRow } from '@tiptap/extension-table-row' ;
75import type { TableRowOptions } from '@tiptap/extension-table-row' ;
8-
96import TableActionButton from '@/extensions/Table/components/TableActionButton' ;
107import type { GeneralOptions } from '@/types' ;
11-
128import type { TableCellBackgroundOptions } from './cell-background' ;
139import { TableCellBackground } from './cell-background' ;
10+ import { TableRow } from './components/TableRow' ;
11+ import { TableCell } from "./components/TableCell"
1412
1513export interface TableOptions extends GeneralOptions < TableOptions > {
1614 HTMLAttributes : Record < string , any >
@@ -32,9 +30,17 @@ export const Table = /* @__PURE__ */ TiptapTable.extend<TableOptions>({
3230 addOptions ( ) {
3331 return {
3432 ...this . parent ?.( ) ,
33+ HTMLAttributes : {
34+ style : `
35+ border: 1px solid #000;
36+ border-collapse: collapse;
37+ width: 100%;
38+ ` ,
39+ } ,
3540 resizable : true ,
3641 lastColumnResizable : true ,
3742 allowTableNodeSelection : false ,
43+
3844 button : ( { editor, t } : any ) => ( {
3945 component : TableActionButton ,
4046 componentProps : {
0 commit comments