diff --git a/apps/client/src/plugins/DocumentHandler/utils/ContentComponentFactory.js b/apps/client/src/plugins/DocumentHandler/utils/ContentComponentFactory.js index dfd70b48c..cb93d75da 100644 --- a/apps/client/src/plugins/DocumentHandler/utils/ContentComponentFactory.js +++ b/apps/client/src/plugins/DocumentHandler/utils/ContentComponentFactory.js @@ -243,7 +243,7 @@ export const BlockQuote = ({ blockQuoteTag, defaultColors }) => { const bgColorItem = blockQuoteTag.attributes.getNamedItem( "data-background-color" ); - if (bgColorItem) { + if (bgColorItem.value) { const textColor = theme.palette.getContrastText(bgColorItem.value); blockQuoteTag.setAttribute("data-text-color", textColor); } @@ -347,7 +347,7 @@ export const AccordionSection = ({ blockQuoteTag, defaultColors }) => { const bgColorItem = blockQuoteTag.attributes.getNamedItem( "data-background-color" ); - if (bgColorItem) { + if (bgColorItem.value) { const textColor = theme.palette.getContrastText(bgColorItem.value); blockQuoteTag.setAttribute("data-text-color", textColor); } @@ -742,7 +742,7 @@ export const CustomLink = ({ aTag, localObserver, bottomMargin }) => { return { mapLink, headerIdentifier, documentLink, externalLink, hoverLink }; }; - const getHoverLink = (hoverLink, tagText) => { + const HoverLink = ({ hoverLink, tagText }) => { return ( { ); }; - const getExternalLink = (externalLink) => { + const ExternalLink = ({ externalLink }) => { + // Grab the theme to determine current light/dark mode + const theme = useTheme(); + return (