diff --git a/src/columnresizing.ts b/src/columnresizing.ts index a8a4ec1..30bfb74 100644 --- a/src/columnresizing.ts +++ b/src/columnresizing.ts @@ -234,7 +234,12 @@ function handleMouseDown( } } - displayColumnWidth(view, pluginState.activeHandle, width, defaultCellMinWidth); + displayColumnWidth( + view, + pluginState.activeHandle, + width, + defaultCellMinWidth, + ); win.addEventListener('mouseup', finish); win.addEventListener('mousemove', move); @@ -400,11 +405,17 @@ export function handleDecorations( const dom = document.createElement('div'); dom.className = 'column-resize-handle'; if (columnResizingPluginKey.getState(state)?.dragging) { - decorations.push(Decoration.node(start + cellPos, start + cellPos + table.nodeAt(cellPos)!.nodeSize, { - class: 'column-resize-dragging' - })); + decorations.push( + Decoration.node( + start + cellPos, + start + cellPos + table.nodeAt(cellPos)!.nodeSize, + { + class: 'column-resize-dragging', + }, + ), + ); } - + decorations.push(Decoration.widget(pos, dom)); } } diff --git a/src/tableview.ts b/src/tableview.ts index 3253d0b..22444fc 100644 --- a/src/tableview.ts +++ b/src/tableview.ts @@ -15,7 +15,10 @@ export class TableView implements NodeView { this.dom = document.createElement('div'); this.dom.className = 'tableWrapper'; this.table = this.dom.appendChild(document.createElement('table')); - this.table.style.setProperty('--default-cell-min-width', `${defaultCellMinWidth}px`); + this.table.style.setProperty( + '--default-cell-min-width', + `${defaultCellMinWidth}px`, + ); this.colgroup = this.table.appendChild(document.createElement('colgroup')); updateColumnsOnResize(node, this.colgroup, this.table, defaultCellMinWidth); this.contentDOM = this.table.appendChild(document.createElement('tbody')); diff --git a/style/tables.css b/style/tables.css index 791d8b6..2d20634 100644 --- a/style/tables.css +++ b/style/tables.css @@ -4,7 +4,7 @@ .ProseMirror table { border-collapse: collapse; table-layout: fixed; - /* width: 100%; */ + width: 100%; overflow: hidden; } .ProseMirror td,