From 7c7cb9e6f4159936e46223ca260c9f70a325bde7 Mon Sep 17 00:00:00 2001 From: Rich Tabor Date: Thu, 22 Jun 2023 10:33:33 -0400 Subject: [PATCH] Add ungroup transform as transform to p --- packages/block-library/src/quote/transforms.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/block-library/src/quote/transforms.js b/packages/block-library/src/quote/transforms.js index d4cd77177bf030..7275ceb5006c78 100644 --- a/packages/block-library/src/quote/transforms.js +++ b/packages/block-library/src/quote/transforms.js @@ -109,6 +109,19 @@ const transforms = { } ); }, }, + { + type: 'block', + blocks: [ 'core/paragraph' ], + transform: ( { citation }, innerBlocks ) => + citation + ? [ + ...innerBlocks, + createBlock( 'core/paragraph', { + content: citation, + } ), + ] + : innerBlocks, + }, { type: 'block', blocks: [ 'core/group' ],