feat: add editor prop to KeyboardShortcutCommand

This commit is contained in:
Philipp Kühn
2021-04-20 22:58:09 +02:00
parent d14942ecbf
commit e0c2460a96
5 changed files with 22 additions and 8 deletions

View File

@@ -4,7 +4,6 @@ import {
Node as ProseMirrorNode,
NodeType,
} from 'prosemirror-model'
import { Command as ProseMirrorCommand } from 'prosemirror-commands'
import { Plugin, Transaction } from 'prosemirror-state'
import { InputRule } from 'prosemirror-inputrules'
import mergeDeep from './utilities/mergeDeep'
@@ -14,6 +13,7 @@ import {
GlobalAttributes,
RawCommands,
ParentConfig,
KeyboardShortcutCommand,
} from './types'
import { NodeConfig } from '.'
import { Editor } from './Editor'
@@ -64,7 +64,7 @@ declare module '@tiptap/core' {
type: NodeType,
parent: ParentConfig<NodeConfig<Options>>['addKeyboardShortcuts'],
}) => {
[key: string]: ProseMirrorCommand,
[key: string]: KeyboardShortcutCommand,
},
/**