Skip to content

Commit

Permalink
Adds undo/redo support for the title. (#13514)
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoreymendez authored Jan 28, 2019
1 parent 891074a commit b598fb3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/editor/src/components/post-title/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,16 @@ const applyWithDispatch = withDispatch( ( dispatch ) => {
const {
insertDefaultBlock,
clearSelectedBlock,
undo,
redo,
} = dispatch( 'core/editor' );

return {
onEnterPress() {
insertDefaultBlock( undefined, undefined, 0 );
},
onUndo: undo,
onRedo: redo,
clearSelectedBlock,
};
} );
Expand Down

0 comments on commit b598fb3

Please sign in to comment.