From bc8e22e1f5c1779f99590593b58f9fade80485a8 Mon Sep 17 00:00:00 2001 From: Glen Davies Date: Wed, 12 May 2021 17:08:38 +1200 Subject: [PATCH] Fix issue with strikethrough and underline not showing in editor --- .../block-library/src/site-title/edit/index.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/site-title/edit/index.js b/packages/block-library/src/site-title/edit/index.js index c93b4287cdbf27..3cca9e076f7edd 100644 --- a/packages/block-library/src/site-title/edit/index.js +++ b/packages/block-library/src/site-title/edit/index.js @@ -26,7 +26,7 @@ export default function SiteTitleEdit( { setAttributes, insertBlocksAfter, } ) { - const { level, textAlign } = attributes; + const { level, textAlign, style: { typography } = {} } = attributes; const [ title, setTitle ] = useEntityProp( 'root', 'site', 'title' ); const TagName = level === 0 ? 'p' : `h${ level }`; const blockProps = useBlockProps( { @@ -34,6 +34,13 @@ export default function SiteTitleEdit( { [ `has-text-align-${ textAlign }` ]: textAlign, } ), } ); + + // Text decoration is not applied to a nested inline block so need to pass this down to + // richtext child element. + const textDecoration = typography?.textDecoration + ? typography?.textDecoration + : undefined; + return ( <> @@ -53,7 +60,10 @@ export default function SiteTitleEdit( {