Skip to content

Commit

Permalink
Add alias to transform heading to paragraph for consistency with clas…
Browse files Browse the repository at this point in the history
…sic editor.
  • Loading branch information
afercia committed Apr 10, 2024
1 parent c6eea9c commit 679554c
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,14 @@ function BlockKeyboardShortcuts() {
description: __( 'Transform heading to paragraph.' ),
keyCombination: {
modifier: 'access',
character: `0`,
character: '0',
},
aliases: [
{
modifier: 'access',
character: '7',
},
],
} );

[ 1, 2, 3, 4, 5, 6 ].forEach( ( level ) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,16 @@ export const textFormattingShortcuts = [
description: __( 'Make the selected text inline code.' ),
},
{
keyCombination: { modifier: 'access', character: '0' },
keyCombination: {
modifier: 'access',
character: '0',
},
aliases: [
{
modifier: 'access',
character: '7',
},
],
description: __( 'Convert the current heading to a paragraph.' ),
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,16 @@ export const textFormattingShortcuts = [
description: __( 'Make the selected text inline code.' ),
},
{
keyCombination: { modifier: 'access', character: '0' },
keyCombination: {
modifier: 'access',
character: '0',
},
aliases: [
{
modifier: 'access',
character: '7',
},
],
description: __( 'Convert the current heading to a paragraph.' ),
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,16 @@ export const textFormattingShortcuts = [
description: __( 'Make the selected text inline code.' ),
},
{
keyCombination: { modifier: 'access', character: '0' },
keyCombination: {
modifier: 'access',
character: '0',
},
aliases: [
{
modifier: 'access',
character: '7',
},
],
description: __( 'Convert the current heading to a paragraph.' ),
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,16 @@ export const textFormattingShortcuts = [
description: __( 'Make the selected text inline code.' ),
},
{
keyCombination: { modifier: 'access', character: '0' },
keyCombination: {
modifier: 'access',
character: '0',
},
aliases: [
{
modifier: 'access',
character: '7',
},
],
description: __( 'Convert the current heading to a paragraph.' ),
},
{
Expand Down

0 comments on commit 679554c

Please sign in to comment.