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 and youknowriad committed Mar 6, 2019
1 parent 4ffb41b commit 5ce27ce
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 5ce27ce

Please sign in to comment.