Skip to content
Prev Previous commit
Next Next commit
Using the create block helper
  • Loading branch information
youknowriad committed Apr 18, 2017
commit 0dc010bad71399c3b2beec7f670fed8a4ea48026
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