diff --git a/packages/format-library/src/link/inline.js b/packages/format-library/src/link/inline.js index cf712f173e51db..a4de03032da651 100644 --- a/packages/format-library/src/link/inline.js +++ b/packages/format-library/src/link/inline.js @@ -97,10 +97,10 @@ function InlineLinkUI( { opensInNewTab: activeAttributes.target === '_blank', nofollow: activeAttributes.rel?.includes( 'nofollow' ), title: richTextText, - cssClasses: activeAttributes.className, + cssClasses: activeAttributes.class, } ), [ - activeAttributes.className, + activeAttributes.class, activeAttributes.id, activeAttributes.rel, activeAttributes.target, diff --git a/packages/format-library/src/link/utils.js b/packages/format-library/src/link/utils.js index ed379b3c4028db..4f64950efd457d 100644 --- a/packages/format-library/src/link/utils.js +++ b/packages/format-library/src/link/utils.js @@ -127,7 +127,7 @@ export function createLinkFormat( { const trimmedCssClasses = cssClasses?.trim(); if ( trimmedCssClasses?.length ) { - format.attributes.className = trimmedCssClasses; + format.attributes.class = trimmedCssClasses; } return format;