return editor for all core command types
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import { Editor } from '../Editor'
|
||||
import { selectAll } from 'prosemirror-commands'
|
||||
|
||||
type SelectAll = () => any
|
||||
type SelectAllCommand = () => Editor
|
||||
|
||||
declare module '../Editor' {
|
||||
interface Editor {
|
||||
selectAll: SelectAll,
|
||||
selectAll: SelectAllCommand,
|
||||
}
|
||||
}
|
||||
|
||||
export default (next: Function, { state, view }: Editor): SelectAll => () => {
|
||||
export default (next: Function, { state, view }: Editor) => () => {
|
||||
selectAll(state, view.dispatch)
|
||||
next()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user