diff --git a/packages/block-library/src/quote/edit.js b/packages/block-library/src/quote/edit.js index d712f9691ee54..66f8f9d66c85a 100644 --- a/packages/block-library/src/quote/edit.js +++ b/packages/block-library/src/quote/edit.js @@ -121,6 +121,7 @@ export default function QuoteEdit( { } addLabel={ __( 'Add citation' ) } removeLabel={ __( 'Remove citation' ) } + excludeElementClassName className="wp-block-quote__citation" insertBlocksAfter={ insertBlocksAfter } { ...( ! isWebPlatform ? { textAlign } : {} ) } diff --git a/packages/block-library/src/utils/caption.js b/packages/block-library/src/utils/caption.js index 2c653a9cc7fb8..82e951d4813eb 100644 --- a/packages/block-library/src/utils/caption.js +++ b/packages/block-library/src/utils/caption.js @@ -32,6 +32,7 @@ export function Caption( { placeholder = __( 'Add caption' ), label = __( 'Caption text' ), showToolbarButton = true, + excludeElementClassName, className, readOnly, tagName = 'figcaption', @@ -70,6 +71,7 @@ export function Caption( { }, [ isCaptionEmpty ] ); + return ( <> { showToolbarButton && ( @@ -96,7 +98,9 @@ export function Caption( { tagName={ tagName } className={ clsx( className, - __experimentalGetElementClassName( 'caption' ) + excludeElementClassName + ? '' + : __experimentalGetElementClassName( 'caption' ) ) } ref={ ref } aria-label={ label }