@ctzhian/tiptap 1.7.0 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,32 +19,33 @@ var hasMultipleCellSelection = function hasMultipleCellSelection(editor) {
19
19
  return cellSelection.$anchorCell.pos !== cellSelection.$headCell.pos;
20
20
  }
21
21
  }
22
- var selectionAny = selection;
23
- var isColSelection = selectionAny.isColSelection();
24
- var isRowSelection = selectionAny.isRowSelection();
25
- // console.log('3️⃣ selectionAny.isColSelection', isColSelection)
26
- // console.log('3️⃣ selectionAny.isRowSelection', isRowSelection)
27
- if (isColSelection || isRowSelection) {
28
- return true;
29
- }
22
+ return false;
23
+ // const selectionAny = selection as any;
24
+ // const isColSelection = selectionAny.isColSelection;
25
+ // const isRowSelection = selectionAny.isRowSelection;
26
+ // // console.log('3️⃣ selectionAny.isColSelection', isColSelection)
27
+ // // console.log('3️⃣ selectionAny.isRowSelection', isRowSelection)
28
+ // if (isColSelection || isRowSelection) {
29
+ // return true;
30
+ // }
30
31
  // console.log('3️⃣ selection.from', selection.from)
31
32
  // console.log('3️⃣ selection.to', selection.to)
32
- if (selection.from !== selection.to) {
33
- var resolvedFrom = editor.state.doc.resolve(selection.from);
34
- var resolvedTo = editor.state.doc.resolve(selection.to);
35
- // console.log('4️⃣ resolvedFrom.nodeAfter', resolvedFrom.nodeAfter)
36
- // console.log('4️⃣ resolvedTo.nodeBefore', resolvedTo.nodeBefore)
37
- if (resolvedFrom.nodeAfter && resolvedTo.nodeBefore) {
38
- var fromCell = resolvedFrom.node();
39
- var toCell = resolvedTo.node();
40
- // console.log('5️⃣ fromCell', fromCell)
41
- // console.log('5️⃣ toCell', toCell)
42
- if (fromCell !== toCell && (fromCell.type.name === 'tableCell' || fromCell.type.name === 'tableHeader')) {
43
- return true;
44
- }
45
- }
46
- }
47
- return false;
33
+ // if (selection.from !== selection.to) {
34
+ // const resolvedFrom = editor.state.doc.resolve(selection.from);
35
+ // const resolvedTo = editor.state.doc.resolve(selection.to);
36
+ // console.log('4️⃣ resolvedFrom.nodeAfter', resolvedFrom.nodeAfter)
37
+ // console.log('4️⃣ resolvedTo.nodeBefore', resolvedTo.nodeBefore)
38
+ // if (resolvedFrom.nodeAfter && resolvedTo.nodeBefore) {
39
+ // const fromCell = resolvedFrom.node();
40
+ // const toCell = resolvedTo.node();
41
+ // console.log('5️⃣ fromCell', fromCell)
42
+ // console.log('5️⃣ toCell', toCell)
43
+ // if (fromCell !== toCell && (fromCell.type.name === 'tableCell' || fromCell.type.name === 'tableHeader')) {
44
+ // return true;
45
+ // }
46
+ // }
47
+ // }
48
+ // return false;
48
49
  };
49
50
  var isClickedCellInSelection = function isClickedCellInSelection(editor, clickedElement) {
50
51
  var selection = editor.state.selection;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctzhian/tiptap",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "基于 Tiptap 二次开发的编辑器组件",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",