diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index 5beb712c80a113..b9cae44550181c 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -783,7 +783,7 @@ Give quoted text visual emphasis. "In quoting others, we cite ourselves." — Ju - **Name:** core/quote - **Category:** text -- **Supports:** anchor, background (backgroundImage, backgroundSize), color (background, gradients, heading, link, text), dimensions (minHeight), interactivity (clientNavigation), layout (~~allowEditing~~), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~ +- **Supports:** align (full, left, right, wide), anchor, background (backgroundImage, backgroundSize), color (background, gradients, heading, link, text), dimensions (minHeight), interactivity (clientNavigation), layout (~~allowEditing~~), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~ - **Attributes:** citation, textAlign, value ## Read More diff --git a/packages/block-library/src/quote/block.json b/packages/block-library/src/quote/block.json index c695c938923ae7..0f9ec97422f64b 100644 --- a/packages/block-library/src/quote/block.json +++ b/packages/block-library/src/quote/block.json @@ -28,6 +28,7 @@ }, "supports": { "anchor": true, + "align": [ "left", "right", "wide", "full" ], "html": false, "background": { "backgroundImage": true, diff --git a/packages/block-library/src/quote/test/transforms.native.js b/packages/block-library/src/quote/test/transforms.native.js index 25030e0a018d41..3d2bc8ae609182 100644 --- a/packages/block-library/src/quote/test/transforms.native.js +++ b/packages/block-library/src/quote/test/transforms.native.js @@ -14,7 +14,7 @@ import { const block = 'Quote'; const initialHtml = ` - +

"This will make running your own blog a viable alternative again."

Adrian Zumbrunnen
diff --git a/packages/block-library/src/quote/transforms.js b/packages/block-library/src/quote/transforms.js index f9b3970433fad6..c960759691bf16 100644 --- a/packages/block-library/src/quote/transforms.js +++ b/packages/block-library/src/quote/transforms.js @@ -9,10 +9,18 @@ const transforms = { { type: 'block', blocks: [ 'core/pullquote' ], - transform: ( { value, citation, anchor, fontSize, style } ) => { + transform: ( { + value, + align, + citation, + anchor, + fontSize, + style, + } ) => { return createBlock( 'core/quote', { + align, citation, anchor, fontSize, @@ -95,7 +103,7 @@ const transforms = { ); }, transform: ( - { citation, anchor, fontSize, style }, + { align, citation, anchor, fontSize, style }, innerBlocks ) => { const value = innerBlocks @@ -103,6 +111,7 @@ const transforms = { .join( '
' ); return createBlock( 'core/pullquote', { value, + align, citation, anchor, fontSize, diff --git a/packages/components/src/mobile/utils/alignments.native.js b/packages/components/src/mobile/utils/alignments.native.js index bc42385988a5d1..f1f737d7ed367a 100644 --- a/packages/components/src/mobile/utils/alignments.native.js +++ b/packages/components/src/mobile/utils/alignments.native.js @@ -13,6 +13,7 @@ export const WIDE_ALIGNMENTS = { 'core/image', 'core/separator', 'core/media-text', + 'core/quote', 'core/pullquote', ], };