fix: update save shortcut to use cmd/ctrl+Shift+S for saving in PlateEditor and FixedToolbarButtons

This commit is contained in:
Anish Sarkar 2026-03-22 23:06:18 +05:30
parent 2c7908f733
commit 3cee59e024
2 changed files with 2 additions and 4 deletions

View file

@ -87,15 +87,13 @@ export function PlateEditor({
onSaveRef.current = onSave; onSaveRef.current = onSave;
}, [onSave]); }, [onSave]);
// Stable Plate plugin for ⌘+S / Ctrl+S save shortcut.
// Only included when onSave is provided.
const SaveShortcutPlugin = useMemo( const SaveShortcutPlugin = useMemo(
() => () =>
createPlatePlugin({ createPlatePlugin({
key: "save-shortcut", key: "save-shortcut",
shortcuts: { shortcuts: {
save: { save: {
keys: [[Key.Mod, "s"]], keys: [[Key.Mod, Key.Shift, "s"]],
handler: () => { handler: () => {
onSaveRef.current?.(); onSaveRef.current?.();
}, },

View file

@ -144,7 +144,7 @@ export function FixedToolbarButtons() {
isSaving ? ( isSaving ? (
"Saving..." "Saving..."
) : ( ) : (
<TooltipWithShortcut label="Save" keys={shortcutKeys("Mod", "S")} /> <TooltipWithShortcut label="Save" keys={shortcutKeys("Mod", "Shift", "S")} />
) )
} }
onClick={onSave} onClick={onSave}