From 1a0275bcac630398b9b856021d4924501c3230da Mon Sep 17 00:00:00 2001 From: makhnatkin Date: Wed, 3 Sep 2025 09:49:23 +0200 Subject: [PATCH 1/3] fix: correct toggle logic for partial selection --- src/utils/actions.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/actions.ts b/src/utils/actions.ts index 9ce719fea..4c814f7eb 100644 --- a/src/utils/actions.ts +++ b/src/utils/actions.ts @@ -10,7 +10,9 @@ export function defineActions(actions: Record Boolean(isMarkActive(state, markType)), isEnable: command, From 5bbee2db6314ebead2854bcea74e3400e52f69ad Mon Sep 17 00:00:00 2001 From: makhnatkin Date: Wed, 3 Sep 2025 11:20:31 +0200 Subject: [PATCH 2/3] fix: added TODO comment --- src/extensions/yfm/Color/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/extensions/yfm/Color/index.ts b/src/extensions/yfm/Color/index.ts index 8c18fcaaa..40b501c49 100644 --- a/src/extensions/yfm/Color/index.ts +++ b/src/extensions/yfm/Color/index.ts @@ -35,6 +35,10 @@ export const Color: ExtensionAuto = (builder) => { if (!hasMark) return true; // remove mark + // TODO: @makhnatkin currently params[colorMarkName] = '' is sent + // when clicking the same color repeatedly + // because of this we can't determine which color it was, we need to always send the color, + // but handle the removal logic differently return toggleMark(type, params)(state, dispatch); } From 355a4a568c4a5c760c8ff73c521e4490f33c9d66 Mon Sep 17 00:00:00 2001 From: makhnatkin Date: Wed, 3 Sep 2025 12:38:38 +0200 Subject: [PATCH 3/3] fix: added TODO comment --- src/bundle/toolbar/markup/MToolbarColors.tsx | 1 + src/bundle/toolbar/wysiwyg/WToolbarColors.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bundle/toolbar/markup/MToolbarColors.tsx b/src/bundle/toolbar/markup/MToolbarColors.tsx index c99d6630a..ad0368c99 100644 --- a/src/bundle/toolbar/markup/MToolbarColors.tsx +++ b/src/bundle/toolbar/markup/MToolbarColors.tsx @@ -10,6 +10,7 @@ export const MToolbarColors: React.FC = ({ focus, onClick, }) => { + // TODO: @makhnatkin check markup mode return ( = ({ enable={action.isEnable()} currentColor={currentColor} exec={(color) => { - action.run({color: color === currentColor ? '' : color}); + action.run({color}); }} disablePortal={disablePortal} className={className}