diff --git a/packages/block-editor/src/components/inserter-list-item/index.js b/packages/block-editor/src/components/inserter-list-item/index.js index 43510cdd52d96e..dc755e87676233 100644 --- a/packages/block-editor/src/components/inserter-list-item/index.js +++ b/packages/block-editor/src/components/inserter-list-item/index.js @@ -49,7 +49,9 @@ function InserterListItem( { ]; }, [ item.name, item.initialAttributes, item.initialAttributes ] ); - const isSynced = isReusableBlock( item ) || isTemplatePart( item ); + const isSynced = + ( isReusableBlock( item ) && item.syncStatus !== 'unsynced' ) || + isTemplatePart( item ); return ( { ); const onSelectItem = useCallback( - ( { name, initialAttributes, innerBlocks }, shouldFocusBlock ) => { - const insertedBlock = createBlock( - name, - initialAttributes, - createBlocksFromInnerBlocksTemplate( innerBlocks ) - ); + ( + { name, initialAttributes, innerBlocks, syncStatus, content }, + shouldFocusBlock + ) => { + const insertedBlock = + syncStatus === 'unsynced' + ? parse( content, { + __unstableSkipMigrationLogs: true, + } ) + : createBlock( + name, + initialAttributes, + createBlocksFromInnerBlocksTemplate( innerBlocks ) + ); onInsert( insertedBlock, undefined, shouldFocusBlock ); },