From 3491ccb97fa59b1afd1c0bbb5a6e804af6e77fc0 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 21 Mar 2022 16:05:35 +0100 Subject: ui: add actions for rows Signed-off-by: Max --- src/nodes/TableCell.js | 7 +++ src/nodes/TableCellView.vue | 135 ++++++++++++++++++++++++++++++++++++++++++ src/nodes/TableHeaderView.vue | 11 +--- 3 files changed, 145 insertions(+), 8 deletions(-) create mode 100644 src/nodes/TableCellView.vue (limited to 'src') diff --git a/src/nodes/TableCell.js b/src/nodes/TableCell.js index a8ce69234..a1f445420 100644 --- a/src/nodes/TableCell.js +++ b/src/nodes/TableCell.js @@ -1,4 +1,6 @@ import { TableCell } from '@tiptap/extension-table-cell' +import { VueNodeViewRenderer } from '@tiptap/vue-2' +import TableCellView from './TableCellView' export default TableCell.extend({ content: 'inline*', @@ -17,4 +19,9 @@ export default TableCell.extend({ { tag: 'table thead ~ tbody td', priority: 70 }, ] }, + + addNodeView() { + return VueNodeViewRenderer(TableCellView) + }, + }) diff --git a/src/nodes/TableCellView.vue b/src/nodes/TableCellView.vue new file mode 100644 index 000000000..1eb62a1e1 --- /dev/null +++ b/src/nodes/TableCellView.vue @@ -0,0 +1,135 @@ + + + + + + + diff --git a/src/nodes/TableHeaderView.vue b/src/nodes/TableHeaderView.vue index 7d8ba0da7..e14fa2b38 100644 --- a/src/nodes/TableHeaderView.vue +++ b/src/nodes/TableHeaderView.vue @@ -97,20 +97,15 @@ export default {