From d7f1476db2f6dffb349a91024df97b50964c54a8 Mon Sep 17 00:00:00 2001 From: Sander Date: Fri, 17 Nov 2023 11:55:18 +0100 Subject: [PATCH] Added CSS.escape to font-family.ts per font-family name. --- packages/extension-font-family/src/font-family.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/extension-font-family/src/font-family.ts b/packages/extension-font-family/src/font-family.ts index 3f844b64347..da5f8488f3b 100644 --- a/packages/extension-font-family/src/font-family.ts +++ b/packages/extension-font-family/src/font-family.ts @@ -44,7 +44,7 @@ export const FontFamily = Extension.create({ } return { - style: `font-family: ${CSS.escape(attributes.fontFamily)}`, + style: `font-family: ${attributes.fontFamily.split(',').map((fontFamily: string) => CSS.escape(fontFamily.trim())).join(', ')}`, } }, },