Skip to content

Commit

Permalink
Add: Block editor keyboard shortcuts to the widget screen and… (#16972)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgefilipecosta authored and gziolo committed Aug 29, 2019
1 parent 45b9f8c commit 04b1d64
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 04b1d64

Please sign in to comment.