feat(editor): wrap selection on code-character keypress #41
No reviewers
Labels
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
codefloe/forgejo-codefloe!41
Loading…
Reference in a new issue
No description provided.
Delete branch "t3code/6477a22e"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds auto-surround ("enclosure") support to the markdown comment editor in textarea mode.
When text is selected and a code/markdown character is pressed, the selection is wrapped in that character instead of being replaced by it.
For example, selecting
textand pressing the backtick key producestext.Supported characters: backtick, asterisk, underscore, tilde, double quote, single quote, and the bracket pairs
(),[],{},<>.Behavior:
Scope is limited to the markdown comment editor textarea mode.
EasyMDE and the CodeMirror 6 file editor are untouched (CodeMirror already auto-surrounds bracket selections via its closeBrackets extension).