1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-25 08:59:31 -05:00
forgejo/release-notes/8.0.0/feat
Danko Aleksejevs 221ca0c404 Implement tab indentation and list continuation in the new editor (#3848, #3849) (#4072)
This overrides handling of Tab and Enter keys in the ComboMarkdownEditor, so that:

* Pressing Tab prepending 4 spaces to the line under cursor, or all the lines in the selection.
* Pressing Shift+Tab removes up to 4 spaces.
* Pressing Enter repeats any indentation and a "repeatable" prefix (list or blockquote) from the current line.

Since Tab "capture" can interfere with keyboard navigation, it's only done if there was any previous input in the textarea or if it was selected with a pointer. Additionally, presing Esc will make the textarea lose focus, resuming tab navigation. This seems adequate to me, but I might be wrong.

Had to use the "deprecated" execCommand method, since anything else I tried messes up the undo history. There's a fallback for when (if?) it's actually removed.

Only tested in desktop Firefox and Chrome so far.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4072
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
Co-authored-by: Danko Aleksejevs <danko@very.lv>
Co-committed-by: Danko Aleksejevs <danko@very.lv>
2024-06-15 13:40:31 +00:00
..
3307.md fix: PKCE only for supported providers 2024-06-10 11:24:32 +02:00
3337.md Adding release note for #3337 2024-06-02 06:04:53 +02:00
3434.md UI: use full screen height for displaying pdf files 2024-04-26 20:42:45 +02:00
3642.md [UI] Allow org members to navigate between the org and the dashboard 2024-05-05 23:14:57 +05:00
3654.md [FEAT] support searching non default branches/tags when using git-grep (#3654) 2024-05-14 15:41:03 +00:00
3723.md chore(release-notes): go-enry v2.8.8 2024-05-13 17:32:28 +02:00
3729.md chore(release-notes): [gitea] week 2024-20 cherry pick 2024-05-12 20:20:18 +02:00
3791.md chore(release-notes): enmime upgrade to v1.2.0 2024-05-23 11:44:26 +02:00
3808.md chore(release-notes): goth upgrade to v1.80.0 2024-05-23 10:55:32 +02:00
3836.md feat: parse prefix from redis URI for queues (#3836) 2024-05-20 14:10:54 +00:00
3838.md [skip ci] docs(release): week 2024-21 cherry pick 2024-06-03 09:11:17 +02:00
3847.md feat: wiki search using git-grep 2024-05-20 13:48:50 +00:00
3870.md Replace imgage diff png background pattern with gradient (#3870) 2024-05-24 17:33:13 +00:00
3886.md add a release note 2024-05-31 16:28:26 +02:00
3917.md [skip ci] docs(release): week 2024-22 cherry pick 2024-06-03 08:24:21 +02:00
3922.md Update module github.com/alecthomas/chroma/v2 to v2.14.0 (take 2) 2024-05-30 22:52:26 +02:00
3985.md [FEAT] Adds x-mode-only anchor styles to display images based if the theme is light or dark mode. (#3985) 2024-06-09 10:50:53 +00:00
3989.md docs(release): add release notes 2024-06-03 10:03:29 +02:00
4027.md add release note 2024-06-05 15:58:51 +02:00
4072.md Implement tab indentation and list continuation in the new editor (#3848, #3849) (#4072) 2024-06-15 13:40:31 +00:00
4083.md docs(release): week 2024-24 cherry pick 2024-06-11 09:19:09 +02:00
4136.md chore(dependency): github.com/yuin/goldmark v1.7.2 release notes 2024-06-15 06:38:04 +02:00