18 lines
489 B
TypeScript
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)
|
|
}
|