Ionaru / Ionaru/easy-markdown-editor
Pos1 and End key behavior unexpected
- Dominant language
- JavaScript
- Stars
- 3.1k
- Forks
- 363
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
When I use the Pos1 Key or End Key while writing notes in the Nextcloud Notes app the behavior is different from other editors I use.
It always jumps to the beginning after the last line break instead of the first position of the current visible line (or last positon for End)
Coming from https://github.com/nextcloud/notes/issues/508 the suggestion was to add the new functionality in upstream.
**Describe the solution you'd like**
Just like VSCode or Notepad++ is doing it (with enabled word wrap/automatic line break):
Pressing once jumps to beginning/end of visible line
Pressing twice jumps to beginning/end of current paragraph.
**Describe alternatives you've considered**
I understand that the current behavior is due to how Markdown works and maybe it is done intentionally like this. I hope that I am not the only one who would like this change and that there isn't somebody who formed a workflow around the current behavior.
If needed the functionality can be added configurable so that other projects can stay at the current behavior if they prefer.
Contributor guide
Research direction
Start by tracing the JavaScript editor's Pos1 and End key handling, particularly how Markdown line breaks and word wrapping are treated. Compare the current behavior with the requested single-press visible-line and double-press paragraph movement, then verify the result in the editor with wrapped notes; consider whether the behavior must remain configurable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, markdown
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100