Skip to content

Commit

Permalink
Using the create block helper
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Apr 18, 2017
1 parent 9a23d20 commit 0dc010b
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions blocks/library/text/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,9 @@ registerBlock( 'core/text', {
style={ align ? { textAlign: align } : null }
onSplit={ ( before, after ) => {
setAttributes( { content: before } );
insertBlockAfter( {
uid: uuid(),
blockType: 'core/text',
attributes: {
content: after
}
} );
insertBlockAfter( wp.blocks.createBlock( 'core/text', {
content: after
} ) );
} }
/>
);
Expand Down

0 comments on commit 0dc010b

Please sign in to comment.