tiptap/packages/core/src/commands/enter.ts
2021-02-16 18:39:37 +01:00

17 lines
317 B
TypeScript

import { Command, RawCommands } from '../types'
declare module '@tiptap/core' {
interface Commands {
enter: {
/**
* Trigger enter.
*/
enter: () => Command,
}
}
}
export const enter: RawCommands['enter'] = () => ({ commands }) => {
return commands.keyboardShortcut('Enter')
}