Restore empty table selection, closes #5581
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { some } from "lodash";
|
||||
import { EditorState, NodeSelection, TextSelection } from "prosemirror-state";
|
||||
import * as React from "react";
|
||||
import createAndInsertLink from "@shared/editor/commands/createAndInsertLink";
|
||||
@@ -78,7 +79,10 @@ function useIsActive(state: EditorState) {
|
||||
}
|
||||
|
||||
const slice = selection.content();
|
||||
return !!slice.content.textBetween(0, slice.content.size);
|
||||
const fragment = slice.content;
|
||||
const nodes = (fragment as any).content;
|
||||
|
||||
return some(nodes, (n) => n.content.size);
|
||||
}
|
||||
|
||||
function useIsDragging() {
|
||||
|
||||
Reference in New Issue
Block a user