Skip to content

Feature : New shortcut to copy all blocks.#74280

Open
Vrishabhsk wants to merge 3 commits intoWordPress:trunkfrom
Vrishabhsk:add/copy-all-shortcut
Open

Feature : New shortcut to copy all blocks.#74280
Vrishabhsk wants to merge 3 commits intoWordPress:trunkfrom
Vrishabhsk:add/copy-all-shortcut

Conversation

@Vrishabhsk
Copy link
Copy Markdown
Contributor

What?

Closes

Why?

How?

  • Register a new shortcut to copy all blocks within a post.
  • New shortcut : shift + option + ⌘ + C.

Testing Instructions

  1. Create a post and add dummy content. Use combination of normal blocks and some blocks with innerblocks like Gallery.
  2. To check for the shortcut, use this shortcut : ^ + option + h. Search for Copy all blocks under Global section.
  3. Use shift + option + ⌘ + C.
  4. Create another post and paste.
  5. The content should be similar.

@github-actions github-actions bot added the [Package] Editor /packages/editor label Dec 30, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 30, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Vrishabhsk <vrishabhsk@git.wordpress.org>
Co-authored-by: MatzeKitt <kittmedia@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: aduth <aduth@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

registerShortcut( {
name: 'core/editor/copy-all',
category: 'global',
description: __( 'Copy all content.' ),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we align this with the current text in the menu? So “Copy all blocks.” would be my string of choice.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @MatzeKitt, i have implemented your change req :

  • Changed the shortcut text to : Copy all blocks.
  • Changed the snackbar text to : All blocks copied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Editor /packages/editor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add keyboard shortcut for copying all blocks

2 participants