mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-01-07 11:58:05 +08:00
20 lines
506 B
TypeScript
20 lines
506 B
TypeScript
import { selectParentNode as originalSelectParentNode } from 'prosemirror-commands'
|
|
import { Command } from '../Editor'
|
|
import { createExtension } from '../Extension'
|
|
|
|
export const SelectParentNode = createExtension({
|
|
addCommands() {
|
|
return {
|
|
selectParentNode: (): Command => ({ state, dispatch }) => {
|
|
return originalSelectParentNode(state, dispatch)
|
|
},
|
|
}
|
|
},
|
|
})
|
|
|
|
declare module '../Editor' {
|
|
interface AllExtensions {
|
|
SelectParentNode: typeof SelectParentNode,
|
|
}
|
|
}
|