Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax <max@nextcloud.com>2022-03-22 13:44:25 +0300
committerMax <max@nextcloud.com>2022-03-31 15:29:26 +0300
commit0cd70c0690a574259af5bea3cdc9878f876885bb (patch)
tree13cd786a5d93f236347f09535d53e4e0e495160e /src
parent3bd2f3a71e9810e92744934e84d43c697813730a (diff)
fix: disallow creating a table from within a table
Signed-off-by: Max <max@nextcloud.com>
Diffstat (limited to 'src')
-rw-r--r--src/nodes/Table.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nodes/Table.js b/src/nodes/Table.js
index 31c9e5b61..f2748d5f9 100644
--- a/src/nodes/Table.js
+++ b/src/nodes/Table.js
@@ -84,6 +84,7 @@ export default Table.extend({
return {
...this.parent(),
insertTable: () => ({ tr, dispatch, editor }) => {
+ if (isInTable(tr)) return false
const node = createTable(editor.schema, 3, 3, true)
if (dispatch) {
const offset = tr.selection.anchor + 1