mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-15 11:09:01 +08:00
add mod-y also for mac, fix #396
This commit is contained in:
parent
afd959be6c
commit
7c7d2c6e19
@ -15,16 +15,12 @@ export default class History extends Extension {
|
|||||||
}
|
}
|
||||||
|
|
||||||
keys() {
|
keys() {
|
||||||
const isWindows = typeof navigator !== 'undefined' ? /Win/.test(navigator.platform) : false
|
|
||||||
const keymap = {
|
const keymap = {
|
||||||
'Mod-z': undo,
|
'Mod-z': undo,
|
||||||
|
'Mod-y': redo,
|
||||||
'Shift-Mod-z': redo,
|
'Shift-Mod-z': redo,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isWindows) {
|
|
||||||
keymap['Mod-y'] = redo
|
|
||||||
}
|
|
||||||
|
|
||||||
return keymap
|
return keymap
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user