Make WordPress Core

Opened 6 months ago

Last modified 4 months ago

#62080 new enhancement

Add Ctrl+S / Cmd+S shortcut to save files in Theme and Plugin Editor

Reported by: iambherulal's profile iambherulal Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch
Focuses: Cc:

Description

Currently, in the WordPress Theme and Plugin File Editor, users must manually click the "Save" button to save their changes. In modern development environments, keyboard shortcuts like Ctrl+S (on Windows/Linux) or Cmd+S (on Mac) are commonly used for saving work.

This ticket proposes adding a Ctrl+S / Cmd+S shortcut in the Theme and Plugin Editor to allow users to save files more efficiently without needing to manually click the "Save" button.

Attachments (3)

add-ctrl-s-save-shortcut.patch (2.7 KB) - added by iambherulal 6 months ago.
add-ctrl-s-save-shortcut.2.patch (1.1 KB) - added by iambherulal 6 months ago.
Updated file
Screenshot 2024-09-19 at 20.00.47.png (1.6 MB) - added by iambherulal 6 months ago.

Download all attachments as: .zip

Change History (5)

This ticket was mentioned in Slack in #core by iambherulal. View the logs.


4 months ago

This ticket was mentioned in PR #7799 on WordPress/wordpress-develop by @ankitkumarshah.


4 months ago
#2

  • Keywords has-patch added

Trac Ticket: core 62080

### Description

This PR introduces a keyboard shortcut (Ctrl+S / Cmd+S) for saving files directly within the Theme and Plugin Editor in WordPress. This enhancement is aimed at improving user experience and efficiency when editing code in the editor.

### Changes Made

  • Added JavaScript logic to listen for Ctrl+S or Cmd+S keypress events in the editor.
  • Integrated the shortcut with the existing Update File functionality.
  • Prevented the default browser save action to avoid conflicts.

### Screenshots / Videos :

https://github.com/user-attachments/assets/b6737ead-2815-4885-8643-00fd14384fa8

Note: See TracTickets for help on using tickets.