Files
tiptap/packages/core/src/commands/createParagraphNear.ts
2021-06-04 21:56:29 +02:00

18 lines
498 B
TypeScript

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