* chore: add precommit hook for eslint fixes, fix linting issues * chore: add eslint import sort plugin
9 lines
306 B
TypeScript
9 lines
306 B
TypeScript
import { Selection } from 'prosemirror-state'
|
|
|
|
import { Predicate } from '../types'
|
|
import { findParentNodeClosestToPos } from './findParentNodeClosestToPos'
|
|
|
|
export function findParentNode(predicate: Predicate) {
|
|
return (selection: Selection) => findParentNodeClosestToPos(selection.$from, predicate)
|
|
}
|