From 39f942aca8d64618676b5a1922713d4da4e2542c Mon Sep 17 00:00:00 2001 From: Chrissi2812 Date: Wed, 15 May 2019 09:38:16 +0200 Subject: [PATCH] adding option to disable resizing of tables closes #310 --- packages/tiptap-extensions/src/nodes/Table.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/tiptap-extensions/src/nodes/Table.js b/packages/tiptap-extensions/src/nodes/Table.js index 8ddd3cbcd..a209c61a9 100644 --- a/packages/tiptap-extensions/src/nodes/Table.js +++ b/packages/tiptap-extensions/src/nodes/Table.js @@ -23,6 +23,12 @@ import TableNodes from './TableNodes' export default class Table extends Node { + get defaultOptions() { + return { + resizable: true, + } + } + get name() { return 'table' } @@ -74,7 +80,7 @@ export default class Table extends Node { get plugins() { return [ - columnResizing(), + ...(this.options.resizable ? [columnResizing()] : []), tableEditing(), ] }