mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-15 02:59:01 +08:00
add command to hard break
This commit is contained in:
parent
a210047eab
commit
c63da16318
@ -19,6 +19,13 @@ export default class HardBreak extends Node {
|
||||
}
|
||||
}
|
||||
|
||||
commands({ type }) {
|
||||
return () => chainCommands(exitCode, (state, dispatch) => {
|
||||
dispatch(state.tr.replaceSelectionWith(type.create()).scrollIntoView())
|
||||
return true
|
||||
})
|
||||
}
|
||||
|
||||
keys({ type }) {
|
||||
const command = chainCommands(exitCode, (state, dispatch) => {
|
||||
dispatch(state.tr.replaceSelectionWith(type.create()).scrollIntoView())
|
||||
|
Loading…
Reference in New Issue
Block a user