tiptap/packages/core/src/commands/joinBackward.ts

16 lines
389 B
TypeScript
Raw Normal View History

2021-01-06 20:02:30 +08:00
import { joinBackward as originalJoinBackward } from 'prosemirror-commands'
2021-02-10 16:59:35 +08:00
import { Command, Commands } from '../types'
2021-01-06 20:02:30 +08:00
/**
* Join two nodes backward.
*/
2021-02-10 16:59:35 +08:00
export const joinBackward: Commands['joinBackward'] = () => ({ state, dispatch }) => {
2021-01-06 20:02:30 +08:00
return originalJoinBackward(state, dispatch)
}
2021-02-10 16:59:35 +08:00
declare module '@tiptap/core' {
interface Commands {
joinBackward: () => Command,
}
}