Skip to content

Commit

Permalink
Allow directInsertBlock attributes to override adjacent block attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewserong committed Jan 17, 2022
1 parent 9448e89 commit 294f18f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/block-editor/src/components/inserter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,10 @@ export default compose( [
}
}
);
blockToInsert = createBlock(
directInsertBlock.name,
newAttributes
);
blockToInsert = createBlock( directInsertBlock.name, {
...newAttributes,
...( directInsertBlock.attributes || {} ),
} );
} else {
blockToInsert = createBlock( allowedBlockType.name );
}
Expand Down

0 comments on commit 294f18f

Please sign in to comment.