1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-22 08:42:32 -05:00
forgejo/web_src/js/features/comp
Danko Aleksejevs 36b6444f34 Remove tab key handling in markdown editor, add toolbar buttons instead, re #4072 #4142 (#4263)
We haven't decided much (to my knowledge), and I've been using the main branch in production (as one does) and found out even I myself rely on Tab sometimes working to move focus and have been caught off guard by it indenting lines instead.

So this removes Tab handling and instead adds two new buttons to the toolbar. The indentation logic is unchanged (other than now focusing the textarea during button handling, to ensure execCommand works, and thus undo history is preserved).

I'm not sure which terminology to use in tooltips. Could also add keyboard shortcuts for the whole toolbar eventually, but as is this is hopefully an better solution to the problems I previously created than un-merging the whole thing :)

<img width="414" alt="Screenshot with two new buttons" src="/attachments/b7af3aa4-a195-48d1-be0a-1559f25dce8e">

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4263
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Danko Aleksejevs <danko@very.lv>
Co-committed-by: Danko Aleksejevs <danko@very.lv>
2024-06-30 13:03:32 +00:00
..
ComboMarkdownEditor.js Remove tab key handling in markdown editor, add toolbar buttons instead, re #4072 #4142 (#4263) 2024-06-30 13:03:32 +00:00
ConfirmModal.js Change green buttons to primary color (#27099) 2023-09-18 22:05:31 +00:00
EasyMDEToolbarActions.js s/Gitea/Forgejo in various log messages and comments 2024-04-21 21:26:15 +05:00
LabelEdit.js replace jquery-minicolors with coloris (#30055) 2024-04-07 11:02:33 +02:00
Paste.js Restore old image pasting behavior (#3965) 2024-06-16 12:45:34 +00:00
QuickSubmit.js Remove jQuery from the "quick submit" handler (#29200) 2024-02-17 23:24:31 +01:00
ReactionSelector.js Remove jQuery class from the reaction selector (#30138) 2024-03-30 07:17:31 +01:00
SearchUserBox.js Refactor all .length === 0 patterns in JS (#30045) 2024-03-30 07:17:30 +01:00
TextExpander.js Update JS dependencies, remove space after emoji completion (#25266) 2023-06-18 08:38:47 +00:00
WebHookEditor.js Fix various loading states, remove .loading class (#29920) 2024-03-26 19:04:26 +01:00