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