Skip to content

Commit

Permalink
Add: Block editor keyboard shortcuts to the widget screen and the pla…
Browse files Browse the repository at this point in the history
…yground
  • Loading branch information
jorgefilipecosta committed Aug 9, 2019
1 parent 1c77941 commit 879c133
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/edit-widgets/src/components/widget-area/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
Inserter as BlockInserter,
WritingFlow,
ObserveTyping,
BlockEditorKeyboardShortcuts,
} from '@wordpress/block-editor';
import { withDispatch, withSelect } from '@wordpress/data';

Expand Down Expand Up @@ -71,9 +72,12 @@ function WidgetArea( {
settings={ settings }
>
{ isSelectedArea && (
<Inserter>
<BlockInserter />
</Inserter>
<>
<Inserter>
<BlockInserter />
</Inserter>
<BlockEditorKeyboardShortcuts />
</>
) }
<SelectionObserver
isSelectedArea={ isSelectedArea }
Expand Down
2 changes: 2 additions & 0 deletions playground/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import '@wordpress/editor'; // This shouldn't be necessary

import { render, useState, Fragment } from '@wordpress/element';
import {
BlockEditorKeyboardShortcuts,
BlockEditorProvider,
BlockList,
WritingFlow,
Expand Down Expand Up @@ -49,6 +50,7 @@ function App() {
onChange={ updateBlocks }
>
<div className="editor-styles-wrapper">
<BlockEditorKeyboardShortcuts />
<WritingFlow>
<ObserveTyping>
<BlockList />
Expand Down

0 comments on commit 879c133

Please sign in to comment.