mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-28 20:20:09 +08:00
18 lines
451 B
TypeScript
18 lines
451 B
TypeScript
import { liftEmptyBlock as originalLiftEmptyBlock } from 'prosemirror-commands'
|
|
import { Command, RawCommands } from '../types'
|
|
|
|
declare module '@tiptap/core' {
|
|
interface Commands {
|
|
liftEmptyBlock: {
|
|
/**
|
|
* Lift block if empty.
|
|
*/
|
|
liftEmptyBlock: () => Command,
|
|
}
|
|
}
|
|
}
|
|
|
|
export const liftEmptyBlock: RawCommands['liftEmptyBlock'] = () => ({ state, dispatch }) => {
|
|
return originalLiftEmptyBlock(state, dispatch)
|
|
}
|