Files
tiptap/packages/core/src/commands/createParagraphNear.ts
Philipp Kühn ca8d1a4245 add command scope
2021-02-16 11:27:58 +01:00

18 lines
489 B
TypeScript

import { createParagraphNear as originalCreateParagraphNear } from 'prosemirror-commands'
import { Command, Commands } from '../types'
declare module '@tiptap/core' {
interface AllCommands {
createParagraphNear: {
/**
* Create a paragraph nearby.
*/
createParagraphNear: () => Command,
}
}
}
export const createParagraphNear: Commands['createParagraphNear'] = () => ({ state, dispatch }) => {
return originalCreateParagraphNear(state, dispatch)
}