mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-28 20:20:09 +08:00
18 lines
468 B
TypeScript
18 lines
468 B
TypeScript
import { selectParentNode as originalSelectParentNode } from 'prosemirror-commands'
|
|
import { Command, RawCommands } from '../types'
|
|
|
|
declare module '@tiptap/core' {
|
|
interface Commands {
|
|
selectParentNode: {
|
|
/**
|
|
* Select the parent node.
|
|
*/
|
|
selectParentNode: () => Command,
|
|
}
|
|
}
|
|
}
|
|
|
|
export const selectParentNode: RawCommands['selectParentNode'] = () => ({ state, dispatch }) => {
|
|
return originalSelectParentNode(state, dispatch)
|
|
}
|