diff --git a/packages/editor/package.json b/packages/editor/package.json index 58f99a1e9..a152342a0 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -42,8 +42,6 @@ "@tiptap/extension-blockquote": "^2.1.13", "@tiptap/extension-character-count": "^2.6.5", "@tiptap/extension-collaboration": "^2.3.2", - "@tiptap/extension-color": "^2.7.1", - "@tiptap/extension-highlight": "^2.7.1", "@tiptap/extension-image": "^2.1.13", "@tiptap/extension-list-item": "^2.1.13", "@tiptap/extension-mention": "^2.1.13", diff --git a/packages/editor/src/core/components/menus/bubble-menu/color-selector.tsx b/packages/editor/src/core/components/menus/bubble-menu/color-selector.tsx index cc3eb5412..12495213d 100644 --- a/packages/editor/src/core/components/menus/bubble-menu/color-selector.tsx +++ b/packages/editor/src/core/components/menus/bubble-menu/color-selector.tsx @@ -16,12 +16,8 @@ type Props = { export const BubbleMenuColorSelector: FC = (props) => { const { editor, isOpen, setIsOpen } = props; - const activeTextColor = COLORS_LIST.find((c) => editor.getAttributes("textStyle").color === c.textColor); - const activeBackgroundColor = COLORS_LIST.find((c) => - editor.isActive("highlight", { - color: c.backgroundColor, - }) - ); + const activeTextColor = COLORS_LIST.find((c) => editor.getAttributes("textStyle").color === c.key); + const activeBackgroundColor = COLORS_LIST.find((c) => editor.getAttributes("textStyle").backgroundColor === c.key); return (
@@ -41,25 +37,17 @@ export const BubbleMenuColorSelector: FC = (props) => { "bg-custom-background-100": !activeBackgroundColor, } )} - style={ - activeBackgroundColor - ? { - backgroundColor: activeBackgroundColor.backgroundColor, - } - : {} - } + style={{ + backgroundColor: activeBackgroundColor ? activeBackgroundColor.backgroundColor : "transparent", + }} > @@ -70,13 +58,13 @@ export const BubbleMenuColorSelector: FC = (props) => {
{COLORS_LIST.map((color) => (