2021-01-06 20:02:30 +08:00
|
|
|
import { joinBackward as originalJoinBackward } from 'prosemirror-commands'
|
2021-06-05 03:56:29 +08:00
|
|
|
import { RawCommands } from '../types'
|
2021-01-06 20:02:30 +08:00
|
|
|
|
2021-02-10 16:59:35 +08:00
|
|
|
declare module '@tiptap/core' {
|
2021-06-05 03:56:29 +08:00
|
|
|
interface Commands<ReturnType> {
|
2021-02-16 18:27:58 +08:00
|
|
|
joinBackward: {
|
|
|
|
/**
|
|
|
|
* Join two nodes backward.
|
|
|
|
*/
|
2021-06-05 03:56:29 +08:00
|
|
|
joinBackward: () => ReturnType,
|
2021-02-16 18:27:58 +08:00
|
|
|
}
|
2021-02-10 16:59:35 +08:00
|
|
|
}
|
|
|
|
}
|
2021-02-11 01:05:02 +08:00
|
|
|
|
2021-02-17 01:36:37 +08:00
|
|
|
export const joinBackward: RawCommands['joinBackward'] = () => ({ state, dispatch }) => {
|
2021-02-11 01:05:02 +08:00
|
|
|
return originalJoinBackward(state, dispatch)
|
|
|
|
}
|