getgrav / getgrav/grav-plugin-admin
WYSIWYG Editor: can't change formatting by clicking icons again
- Dominant language
- PHP
- Stars
- 377
- Forks
- 225
- Avg merge
- 11h 51m
- Merged PRs (30d)
- 4
Description
In the WYSIWYG editor, there is a style bar on top to add some formatting to the text. You can simply select a text part, and click on that icon. It then will surround the selection with appropriate markdown syntax.
Now when you have a text like this ⇒ (This is a _very **basic** example_ text):
```md
This is a _very **basic** example_ text
```
..., you can't simply clear that formatting. When you have the text selected and click on that icon again, you would think it will clear that piece of formatting, like you know from other apps. But it doesn't, it simply reapplies the same style.
If possible, I'd like to have it to behave like every other app. This is sometimes very confusing to users which know other apps. It would be great too, if the icons would be visually lifted when the text at the cursor position has some formattings applied.
If that wouldn't be possible, I think at least there should be a clear formatting button which removes all formatting.
Contributor guide
Research direction
Start by locating the WYSIWYG editor's style bar and the handlers for applying markdown formatting. Reproduce the issue with nested emphasis and select formatted text, then verify that clicking the active style removes it and that the corresponding icons reflect formatting at the cursor position.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, markdown
- Domain
- content, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100