mirror of
https://github.com/docmost/docmost.git
synced 2026-05-19 07:54:05 +08:00
Merge branch 'main' into tiptap3-migration
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
import { Editor, findParentNode, isTextSelection } from "@tiptap/core";
|
||||
import { EditorState, Selection, Transaction } from '@tiptap/pm/state';
|
||||
import { EditorState, Selection, Transaction } from "@tiptap/pm/state";
|
||||
import { EditorView } from "@tiptap/pm/view";
|
||||
import { CellSelection, TableMap } from "@tiptap/pm/tables";
|
||||
import { Node, ResolvedPos } from "@tiptap/pm/model";
|
||||
import { Table } from "@tiptap/extension-table";
|
||||
import { sanitizeUrl as braintreeSanitizeUrl } from "@braintree/sanitize-url";
|
||||
import { EditorView } from '@tiptap/pm/view';
|
||||
import { customAlphabet } from "nanoid";
|
||||
|
||||
export const isRectSelected = (rect: any) => (selection: CellSelection) => {
|
||||
@@ -288,11 +287,7 @@ export const isColumnGripSelected = ({
|
||||
const nodeDOM = view.nodeDOM(from) as HTMLElement;
|
||||
const node = nodeDOM || domAtPos;
|
||||
|
||||
if (
|
||||
!editor.isActive(Table.name) ||
|
||||
!node ||
|
||||
isTableSelected(state.selection)
|
||||
) {
|
||||
if (!editor.isActive("table") || !node || isTableSelected(state.selection)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -325,11 +320,7 @@ export const isRowGripSelected = ({
|
||||
const nodeDOM = view.nodeDOM(from) as HTMLElement;
|
||||
const node = nodeDOM || domAtPos;
|
||||
|
||||
if (
|
||||
!editor.isActive(Table.name) ||
|
||||
!node ||
|
||||
isTableSelected(state.selection)
|
||||
) {
|
||||
if (!editor.isActive("table") || !node || isTableSelected(state.selection)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user