Skip to content

fix: editor bold resets text color & Ctrl+B toggles sidebar#80

Open
giorgigordiashvili wants to merge 1 commit into
Qualiora:mainfrom
giorgigordiashvili:fix/editor-bold-color-and-shortcut
Open

fix: editor bold resets text color & Ctrl+B toggles sidebar#80
giorgigordiashvili wants to merge 1 commit into
Qualiora:mainfrom
giorgigordiashvili:fix/editor-bold-color-and-shortcut

Conversation

@giorgigordiashvili

Copy link
Copy Markdown

Summary

  • Bold strips text color: Tailwind's prose class applies its own color to <strong> elements, overriding the inherited inline color from the parent <span style="color: ...">. Fixed by adding prose-strong:text-inherit so bold text inherits the color set by the color picker.
  • Ctrl+B toggles sidebar: The sidebar's global keydown handler catches Ctrl+B even when focus is inside the rich text editor. Fixed by skipping the handler when event.target is a contentEditable element.

Closes #76

Test plan

  • Open the editor at /extended-ui/editor
  • Pick a text color, type some text, select it, press Ctrl+B — text should become bold while keeping the color
  • Press Ctrl+B inside the editor — sidebar should NOT toggle
  • Press Ctrl+B outside the editor (e.g. on the dashboard) — sidebar should still toggle normally

…r conflict

- Add prose-strong:text-inherit to the editor so bold text inherits
  the color from its parent span instead of resetting to the prose
  default color
- Skip the sidebar Ctrl+B shortcut when the event target is inside
  a contenteditable element, letting the editor handle it

Closes Qualiora#76
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Editor bold option make coloring text transform to base color

1 participant