add command to hard break

This commit is contained in:
Hans Pagel 2020-09-30 15:04:11 +02:00
parent a210047eab
commit c63da16318

View File

@ -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())