Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cmd+V/Ctrl+V paste support for URLs turning them into Markdown links #209610

Closed
vittorius opened this issue Mar 28, 2024 · 6 comments · Fixed by #209512
Closed

Add Cmd+V/Ctrl+V paste support for URLs turning them into Markdown links #209610

vittorius opened this issue Mar 28, 2024 · 6 comments · Fixed by #209512
Assignees
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@vittorius
Copy link

(I haven't found any existing issues, open or closed, on this topic.)

It would be great to handle the Cmd+V/Ctrl+V on a selected text to auto-create a Markdown hyperlink when inserting a URL, just like the Github web UI does.

@alexr00
Copy link
Member

alexr00 commented Apr 3, 2024

Is this in the PR description or in the comments widget in the editor?

@alexr00 alexr00 added the feature-request Request for new features or functionality label Apr 3, 2024
@vittorius
Copy link
Author

In the comments widget when commenting a file

@alexr00
Copy link
Member

alexr00 commented Apr 3, 2024

@mjbvz I think you've done work recently to improve the pasting behavior for links in editors where the language is markdown. Do you know if there's a way I can include your markdown pasting work in the comment editor?

@mjbvz
Copy link
Collaborator

mjbvz commented Apr 3, 2024

Possible but may be some work. What needs to happen:

  1. Expose the comment input editor document as a text document that extensions can see. Not sure if this is already done, but you can checkout scm input as an example
  2. Add CopyPasteController as a contribution in that editor
  3. Make sure that the markdown extension features work. Probably should but the paste features may need to be registered for scminput too

mjbvz referenced this issue in mjbvz/vscode Apr 4, 2024
Fixes https://github.com/microsoft/vscode-pull-request-github/issues/5875
For microsoft#209508

Exposes comment input editors as text documents that extensions can see. Enables a few features in them too such as 'paste as' and 'drop into'
@alexr00 alexr00 added this to the April 2024 milestone Apr 4, 2024
@alexr00 alexr00 transferred this issue from microsoft/vscode-pull-request-github Apr 5, 2024
@vscodenpa vscodenpa added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Apr 5, 2024
@alexr00 alexr00 added the verification-needed Verification of issue is requested label Apr 22, 2024
@alexr00
Copy link
Member

alexr00 commented Apr 22, 2024

To verify:

  • Install an extension that provides commenting, such as GitHub Pull Requests.
  • Add a comment. In the comment widget editor, past in a url.
  • Verify that it pastes as a markdown comment.

@benibenj
Copy link
Contributor

Verified assuming that it's not meant to do it automatically, but by using the paste options.

Code_-_Insiders_ghVBnPOTWy

@benibenj benibenj added the verified Verification succeeded label Apr 23, 2024
@microsoft microsoft locked and limited conversation to collaborators Jun 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants