UNPKG

@tiptap/core

Version:

headless rich text editor

20 lines (16 loc) 556 B
import { createParagraphNear as originalCreateParagraphNear } from '@tiptap/pm/commands' import { RawCommands } from '../types.js' declare module '@tiptap/core' { interface Commands<ReturnType> { createParagraphNear: { /** * Create a paragraph nearby. * @example editor.commands.createParagraphNear() */ createParagraphNear: () => ReturnType } } } export const createParagraphNear: RawCommands['createParagraphNear'] = () => ({ state, dispatch }) => { return originalCreateParagraphNear(state, dispatch) }