Register rich text format keyboard shortcuts#83
Merged
Conversation
Import @wordpress/format-library to register standard rich text formats (bold, italic, link, code, strikethrough, etc.) and their keyboard shortcuts. Press This uses BlockEditorProvider directly, which doesn't include these by default. Also adds docs/keyboard-shortcuts.md documenting which shortcuts are available and which are not yet supported. See #81
This was referenced Mar 1, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR restores standard Gutenberg rich-text formatting shortcuts in Press This by ensuring core format types are registered when the app boots (since Press This uses BlockEditorProvider rather than EditorProvider).
Changes:
- Add
@wordpress/format-libraryas an application dependency. - Import
@wordpress/format-libraryin the JS entry point so format types/shortcuts register on load. - Add documentation describing which keyboard shortcuts are (and aren’t) available in Press This.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/index.js | Imports @wordpress/format-library at startup to register core rich-text formats and shortcuts. |
| package.json | Adds @wordpress/format-library to dependencies. |
| package-lock.json | Locks the newly added dependency and resulting transitive dependency graph updates. |
| docs/keyboard-shortcuts.md | Documents available/unavailable shortcuts in Press This vs the full editor. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Import
@wordpress/format-libraryto register standard rich text format types and their keyboard shortcuts. Press This usesBlockEditorProviderdirectly rather than the fullEditorProvider, which means format-library isn't initialized automatically. Without it, shortcuts like Ctrl+K (link), Ctrl+B (bold), and Ctrl+I (italic) don't work.@wordpress/format-libraryas a dependencydocs/keyboard-shortcuts.mddocumenting which Gutenberg shortcuts are available in Press This and which aren'tSee #81
Test plan