mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-06-07 09:25:29 +08:00

* Require .js endings * add extension alias for cypress to resolve ts files with js endings
21 lines
597 B
TypeScript
21 lines
597 B
TypeScript
// @ts-ignore
|
|
// TODO: add types to @types/prosemirror-commands
|
|
import { selectTextblockStart as originalSelectTextblockStart } from '@tiptap/pm/commands'
|
|
|
|
import { RawCommands } from '../types.js'
|
|
|
|
declare module '@tiptap/core' {
|
|
interface Commands<ReturnType> {
|
|
selectTextblockStart: {
|
|
/**
|
|
* Moves the cursor to the start of current text block.
|
|
*/
|
|
selectTextblockStart: () => ReturnType
|
|
}
|
|
}
|
|
}
|
|
|
|
export const selectTextblockStart: RawCommands['selectTextblockStart'] = () => ({ state, dispatch }) => {
|
|
return originalSelectTextblockStart(state, dispatch)
|
|
}
|