add some more commands

This commit is contained in:
Philipp Kühn
2020-09-21 23:17:30 +02:00
parent 778e064979
commit 4da71ecfbb
27 changed files with 207 additions and 210 deletions

View File

@@ -1,7 +1,7 @@
import { Editor } from '../Editor'
import { selectParentNode } from 'prosemirror-commands'
import { Command } from '../Editor'
import { selectParentNode as originalSelectParentNode } from 'prosemirror-commands'
type SelectParentNodeCommand = () => Editor
type SelectParentNodeCommand = () => Command
declare module '../Editor' {
interface Editor {
@@ -9,7 +9,6 @@ declare module '../Editor' {
}
}
export default (next: Function, { state, view }: Editor) => () => {
selectParentNode(state, view.dispatch)
next()
export const selectParentNode: SelectParentNodeCommand = () => ({ state, dispatch }) => {
return originalSelectParentNode(state, dispatch)
}