-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Open
Labels
Description
🐛 Markdown Toolbar Formatting Issues (Bold / Italic / Strikethrough / Code)
Description
There are issues with the behavior of the markdown formatting toolbar buttons (Bold, Italic, Strikethrough, Inline Code, Multiline Code).
The current behavior creates inconsistent formatting and unexpected nested symbols.
🔴 Issue 1: Button Activation Behavior
Formatting buttons (e.g., Bold) should behave as toggle buttons:
- When pressed once → activate formatting mode
- When pressed again → deactivate formatting mode
Currently:
- Pressing the button simply inserts markdown symbols
- It does not behave as an active/deactive toggle
- This causes unexpected formatting when users continue typing
Expected Behavior:
- Button should visually indicate active state
- Formatting should apply while active
- Pressing again should stop formatting
🔴 Issue 2: Duplicate / Nested Markdown Symbols
When applying formatting inside already formatted text, extra symbols are inserted.
Example (Bold case):
Before:
**hi*hello*
After editing:
*hihello*
Observed Problems:
- Extra
*characters are inserted - Nested formatting creates broken markdown
- No validation prevents duplicate or conflicting markers
Expected Behavior:
- Avoid inserting duplicate markdown symbols
- Detect if selection is already formatted
- Cleanly merge or remove formatting without leaving stray characters
🧪 Affected Formatting Buttons
- Bold (
**) - Italic (
*) - Strikethrough (
~~) - Inline Code (
`) - Multiline Code (```)
💡 Suggested Improvements
- Implement proper toggle state for formatting buttons
- Detect existing formatting before applying new formatting
- Prevent nested duplicate symbols
- Ensure clean removal of formatting when toggled off
Environment
- Latest develop branch
- Reproducible in message composer
If needed, I can provide a screen recording demonstrating the issue.
Reactions are currently unavailable