Added support for keystrokes for markdown files
What does this MR do and why?
Introduces support for the keystrokes when editing markdown files in Source Editor. Several buttons on the markdown toolbar introduce the keystrokes. Until now, those keystrokes didn't work in the Web Editor. This MR addresses that.
Screenshots or screen recordings
Default | Cleanup on file name change |
---|---|
Screen_Recording_2023-03-14_at_00.32.56 | Screen_Recording_2023-03-14_at_00.34.35 |
How to set up and validate locally
-
In rails console enable the toolbar either globally, or for your user
Feature.enable(:source_editor_toolbar)
-
In a repository, open a Markdown file. Alternatively, create a new file and give it a name of something like
foo.md
: the toolbar will be shown automatically once you focus out of the file name field -
Edit the file using the keystrokes shown for the buttons on the toolbar (bold, italic, etc.)
-
Re-name the file to have an extension other than
.md
(.txt
, for example). -
Try editing the document using the same keystrokes. None of the keystrokes should work now unless you re-name the file back to
.md
.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #361609 (closed)