refactoring
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import { newlineInCode as originalNewlineInCode } from 'prosemirror-commands'
|
||||
import { Command, Commands } from '../types'
|
||||
|
||||
/**
|
||||
* Add a newline character in code.
|
||||
*/
|
||||
export const newlineInCode: Commands['newlineInCode'] = () => ({ state, dispatch }) => {
|
||||
return originalNewlineInCode(state, dispatch)
|
||||
}
|
||||
|
||||
declare module '@tiptap/core' {
|
||||
interface Commands {
|
||||
/**
|
||||
* Add a newline character in code.
|
||||
*/
|
||||
newlineInCode: () => Command,
|
||||
}
|
||||
}
|
||||
|
||||
export const newlineInCode: Commands['newlineInCode'] = () => ({ state, dispatch }) => {
|
||||
return originalNewlineInCode(state, dispatch)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user