From fe35c1cc2d8638fa31ddfb36867bbcebc9979c34 Mon Sep 17 00:00:00 2001 From: Eugeny Date: Mon, 19 Jan 2026 00:52:48 +0300 Subject: [PATCH] fix(selection): removeFakeBackground no longer removes text formatting --- src/components/selection.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/selection.ts b/src/components/selection.ts index 1ab2e568..640899e7 100644 --- a/src/components/selection.ts +++ b/src/components/selection.ts @@ -60,7 +60,6 @@ export default class SelectionUtils { * Native Document's commands for fake background */ private readonly commandBackground: string = 'backColor'; - private readonly commandRemoveFormat: string = 'removeFormat'; /** * Editor styles @@ -416,9 +415,9 @@ export default class SelectionUtils { if (!this.isFakeBackgroundEnabled) { return; } + document.execCommand(this.commandBackground, false, 'transparent'); this.isFakeBackgroundEnabled = false; - document.execCommand(this.commandRemoveFormat); } /**