Skip to content

Commit

Permalink
Format Library: Remove secondary (access) shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Apr 25, 2019
1 parent d5bdd53 commit ff782ef
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 26 deletions.
9 changes: 1 addition & 8 deletions packages/format-library/src/code/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { __ } from '@wordpress/i18n';
import { Fragment } from '@wordpress/element';
import { toggleFormat } from '@wordpress/rich-text';
import { RichTextShortcut, RichTextToolbarButton } from '@wordpress/block-editor';
import { RichTextToolbarButton } from '@wordpress/block-editor';

const name = 'core/code';

Expand All @@ -18,18 +18,11 @@ export const code = {

return (
<Fragment>
<RichTextShortcut
type="access"
character="x"
onUse={ onToggle }
/>
<RichTextToolbarButton
icon="editor-code"
title={ __( 'Code' ) }
onClick={ onToggle }
isActive={ isActive }
shortcutType="access"
shortcutCharacter="x"
/>
</Fragment>
);
Expand Down
10 changes: 0 additions & 10 deletions packages/format-library/src/link/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,6 @@ export const link = {

return (
<Fragment>
<RichTextShortcut
type="access"
character="a"
onUse={ this.addLink }
/>
<RichTextShortcut
type="access"
character="s"
onUse={ this.onRemoveFormat }
/>
<RichTextShortcut
type="primary"
character="k"
Expand Down
9 changes: 1 addition & 8 deletions packages/format-library/src/strikethrough/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { __ } from '@wordpress/i18n';
import { Fragment } from '@wordpress/element';
import { toggleFormat } from '@wordpress/rich-text';
import { RichTextToolbarButton, RichTextShortcut } from '@wordpress/block-editor';
import { RichTextToolbarButton } from '@wordpress/block-editor';

const name = 'core/strikethrough';

Expand All @@ -18,18 +18,11 @@ export const strikethrough = {

return (
<Fragment>
<RichTextShortcut
type="access"
character="d"
onUse={ onToggle }
/>
<RichTextToolbarButton
icon="editor-strikethrough"
title={ __( 'Strikethrough' ) }
onClick={ onToggle }
isActive={ isActive }
shortcutType="access"
shortcutCharacter="d"
/>
</Fragment>
);
Expand Down

0 comments on commit ff782ef

Please sign in to comment.