remove prosemirror-utils
This commit is contained in:
7
packages/core/src/helpers/findParentNode.ts
Normal file
7
packages/core/src/helpers/findParentNode.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { Selection } from 'prosemirror-state'
|
||||
import findParentNodeClosestToPos from './findParentNodeClosestToPos'
|
||||
import { Predicate } from '../types'
|
||||
|
||||
export default function findParentNode(predicate: Predicate) {
|
||||
return (selection: Selection) => findParentNodeClosestToPos(selection.$from, predicate)
|
||||
}
|
||||
Reference in New Issue
Block a user