add toggleMark command
This commit is contained in:
15
packages/core/src/commands/selectParentNode.ts
Normal file
15
packages/core/src/commands/selectParentNode.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Editor } from '../Editor'
|
||||
import { selectParentNode } from 'prosemirror-commands'
|
||||
|
||||
type SelectParentNode = () => any
|
||||
|
||||
declare module '../Editor' {
|
||||
interface Editor {
|
||||
selectParentNode: SelectParentNode,
|
||||
}
|
||||
}
|
||||
|
||||
export default (next: Function, { state, view }: Editor): SelectParentNode => () => {
|
||||
selectParentNode(state, view.dispatch)
|
||||
next()
|
||||
}
|
||||
Reference in New Issue
Block a user