0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-03-27 21:08:13 +00:00

undo & redo

This commit is contained in:
Víctor Losada Hernández
2026-03-27 00:09:27 +01:00
parent 06e15a04e9
commit a00a3440fc
2 changed files with 5 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
import { keymap } from '@codemirror/view';
import { undo, redo } from '@codemirror/commands';
const indentMore = (view)=>{
const { from, to } = view.state.selection.main;
@@ -221,4 +222,6 @@ export const customKeymap = keymap.of([
{ key: 'Shift-Mod-6', run: makeHeader(6) },
{ key: 'Shift-Mod-Enter', run: newColumn },
{ key: 'Mod-Enter', run: newPage },
{ key: 'Mod-z', run: undo }, //i think it may be unnecessary
{ key: 'Mod-Shift-z', run: redo },
]);