From fe35c1cc2d8638fa31ddfb36867bbcebc9979c34 Mon Sep 17 00:00:00 2001 From: Eugeny Date: Mon, 19 Jan 2026 00:52:48 +0300 Subject: [PATCH 1/2] 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 1ab2e5686..640899e73 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); } /** From 62875455d6fbd2ee0fa3799044cda77e7497153d Mon Sep 17 00:00:00 2001 From: Eugeny Date: Mon, 19 Jan 2026 00:55:11 +0300 Subject: [PATCH 2/2] fix(selection): fix jsdoc --- src/components/selection.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/selection.ts b/src/components/selection.ts index 640899e73..40cceaeb7 100644 --- a/src/components/selection.ts +++ b/src/components/selection.ts @@ -57,7 +57,7 @@ export default class SelectionUtils { public isFakeBackgroundEnabled = false; /** - * Native Document's commands for fake background + * Native Document's command for fake background */ private readonly commandBackground: string = 'backColor';