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

18 lines
457 B
TypeScript

import { liftEmptyBlock as originalLiftEmptyBlock } from 'prosemirror-commands'
import { RawCommands } from '../types'
declare module '@tiptap/core' {
interface Commands<ReturnType> {
liftEmptyBlock: {
/**
* Lift block if empty.
*/
liftEmptyBlock: () => ReturnType,
}
}
}
export const liftEmptyBlock: RawCommands['liftEmptyBlock'] = () => ({ state, dispatch }) => {
return originalLiftEmptyBlock(state, dispatch)
}