Compare commits

...

1 Commits

Author SHA1 Message Date
600bef3da0 fix(editor): prevent text color removal from other list items when setting color in lists
Only unset color when 'Default' is selected. This ensures setting color on one list item does not remove it from others.
2025-06-23 11:28:06 -07:00

View File

@ -156,13 +156,11 @@ export const ColorSelector: FC<ColorSelectorProps> = ({
)
}
onClick={() => {
editor.commands.unsetColor();
name !== "Default" &&
editor
.chain()
.focus()
.setColor(color || "")
.run();
if (name === "Default") {
editor.commands.unsetColor();
} else {
editor.chain().focus().setColor(color || "").run();
}
setIsOpen(false);
}}
style={{ border: "none" }}