import { UxCommand } from "./constants"; import { schema } from "./schema"; import { Command } from "./types"; export const hardBreak: Command = (state, dispatch) => { if (dispatch !== undefined) { dispatch(state.tr.replaceSelectionWith(schema.nodes.br.create()).scrollIntoView()); } return true; }; export const ux = { [UxCommand.EnterHard]: hardBreak };