From 3e63c2b717a917690c6db71a8ef86c93146e3121 Mon Sep 17 00:00:00 2001 From: Abhijeet Singh Date: Thu, 24 Aug 2023 15:50:00 +0530 Subject: [PATCH] fix: Italics not being shown in the description after saving (#10848) * added ignore rule for em tag in turndown * added ignore rule for em tag in turndown --------- Co-authored-by: Abhijeet Singh --- packages/lib/turndownService.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/lib/turndownService.ts b/packages/lib/turndownService.ts index 47e1854db5..f80bea7618 100644 --- a/packages/lib/turndownService.ts +++ b/packages/lib/turndownService.ts @@ -31,6 +31,13 @@ turndownService.addRule("enter", { }, }); +turndownService.addRule("ignoreEmphasized", { + filter: "em", + replacement: function (content) { + return content; + }, +}); + function isShiftEnter(node: HTMLElement) { let currentNode: HTMLElement | null | ParentNode = node;