mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-08-25 07:42:20 +10:00
feat(editor): add multicolor highlight with auto-contrast text (#3110)
* feat(editor): add multicolor highlight with auto-contrast text Enable the Tiptap Highlight extension in multicolor mode, replacing the single-color yellow toggle with a full color picker (16 presets + custom). When the chosen highlight color is perceptually dark, text inside the mark automatically renders white for readability. Changes span the full pipeline: - Editor: ColorPicker UI, extended renderHTML for contrast detection - PDF: normalizeMarkElements preserves data-color as inline style - DOCX: mergeStyle reads actual background-color from <mark> - Utils: new isDarkColor() luminance helper Backward-compatible: legacy <mark> without data-color still renders yellow. Resolves #3109 * fix: handle multicolor highlight edge cases --------- Co-authored-by: Amruth Pillai <im.amruth@gmail.com>
This commit is contained in:
co-authored by
Amruth Pillai
parent
1507d869c7
commit
e96a51f31c
@@ -648,6 +648,7 @@ msgstr "Chinese (Traditional)"
|
||||
msgid "Choose a model and resume draft."
|
||||
msgstr "Choose a model and resume draft."
|
||||
|
||||
#. Preset or custom shade refer to the color picker
|
||||
#. Preset or custom shade refer to the color picker
|
||||
#: src/components/input/rich-input.tsx
|
||||
msgid "Choose a preset or custom shade."
|
||||
@@ -665,6 +666,7 @@ msgstr "Choose an existing conversation from the sidebar, or start a new draft-f
|
||||
msgid "Circle"
|
||||
msgstr "Circle"
|
||||
|
||||
#. Clear the highlight color
|
||||
#. Clear the text color
|
||||
#: src/components/input/rich-input.tsx
|
||||
msgid "Clear"
|
||||
@@ -1774,6 +1776,10 @@ msgstr "High"
|
||||
msgid "Highlight"
|
||||
msgstr "Highlight"
|
||||
|
||||
#: src/components/input/rich-input.tsx
|
||||
msgid "Highlight Color"
|
||||
msgstr "Highlight Color"
|
||||
|
||||
#: src/libs/locale.ts
|
||||
msgid "Hindi"
|
||||
msgstr "Hindi"
|
||||
@@ -1803,7 +1809,6 @@ msgid "Hungarian"
|
||||
msgstr "Hungarian"
|
||||
|
||||
#: src/components/level/combobox.tsx
|
||||
#: src/dialogs/resume/sections/custom.tsx
|
||||
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
|
||||
msgid "Icon"
|
||||
msgstr "Icon"
|
||||
|
||||
Reference in New Issue
Block a user