feat: Support for Markdown Formatting Keyboard Shortcuts #3936
+114
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
Link: #1624
Describe what this PR does
This PR adds the keyboard shortcuts to format the markdown here are the descriptions of what each shortcut do:
cmd/ctrl+b : set selected text as bold
cmd/ctrl+i : set selected text as italics
(pressing cmd/ctrl+b or cmd/ctrl+i again on the selected text will undo the formatting)
cmd/ctrl+l : replace selected text with text, the author of the issue wanted this command to be cmd/ctrl+k but we already have this shortcut for search i guess, so pressing this command will take the focus to search input field so i decided to change the combination.
cmd/ctrl+v : when pasting a link over selected text, convert to hyperlink
Note
I have tested this on windows and linux haven't tested it on mac
This was fun and challenging for me. As we all know text manipulation is not a fun thing to do....😉
Thank you daily.dev for keeping this awesome project open-source 🙏❤️
Events
Did you introduce any new tracking events?
If yes please remove the comment HTML comment tags and fill the table below
Don't forget to update the Analytics Taxonomy sheet
Log the new/changed events below:
-->
Experiment
Did you introduce any new experiments?
Manual Testing
Caution
Please make sure existing components are not breaking/affected by this PR