Markdown: Select text and paste URL to create link
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
What does this MR do and why?
Support pasting URLs in markdown
This behavior is relatively common in markdown-esque web editors, where, if you paste content that is a URL and have text already selected, the editor inserts the proper markup to make the selected text a link to the pasted URL.
References
See: #233393 (closed)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
How to set up and validate locally
Here was my process to record the screen recording:
- Connect to a GDK.
- Check out the branch associated with this MR in the
gitlabproject in the GDK. - Enable the feature flag in
bin/rails cFeature.enable(:markdown_paste_url, your_test_user) - Browse to that GDK's web interface, and open any issue.
- Copy a URL to the clipboard, and select different regions of text, and paste the URL.
Edited by Anthony Juckel