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 { selectAll } from 'prosemirror-commands'
import { Command } from '../Editor'
import { selectAll as originalSelectAll } from 'prosemirror-commands'
type SelectAllCommand = () => Editor
type SelectAllCommand = () => Command
declare module '../Editor' {
interface Editor {
@@ -9,7 +9,6 @@ declare module '../Editor' {
}
}
export default (next: Function, { state, view }: Editor) => () => {
selectAll(state, view.dispatch)
next()
export const selectAll: SelectAllCommand = () => ({ state, dispatch }) => {
return originalSelectAll(state, dispatch)
}