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

Test markdown url pasting #203095

Closed
3 tasks done
mjbvz opened this issue Jan 23, 2024 · 3 comments
Closed
3 tasks done

Test markdown url pasting #203095

mjbvz opened this issue Jan 23, 2024 · 3 comments

Comments

@mjbvz
Copy link
Collaborator

mjbvz commented Jan 23, 2024

Test for #188871

Complexity: 3

Create Issue


Summary

This iteration we re-enabled the markdown paste url as link feature. When you copy text that looks like a url and paste it into a markdown file, this feature will automatically transform it into a markdown link: [link text](http://example.com)

Testing

Test out this feature in some markdown files . I've detailed the expected behavior below but please also let me know if something feels wrong when using this feature

Default Behavior

  • This feature should only be enabled if you are pasting a uri
  • If you have text selected when pasting, a markdown link should be created
  • If you do not have text selected, the url should be pasted but you should also see an option to paste as a markdown link in the editor
  • Pasting as a markdown link should also be disabled inside of markdown code blocks and html blocks

Advanced

  • The markdown.editor.pasteUrlAsFormattedLink.enabled setting controls this behavior
  • If you set "markdown.editor.pasteUrlAsFormattedLink.enabled": "smart", then you should no longer need a selection to paste a markdown link (however markdown links should still be disabled in code blocks and other elements)
  • Regardless of markdown.editor.pasteUrlAsFormattedLink.enabled, the paste as... command should always work
  • All of this should also work in markdown cells in notebooks
@roblourens
Copy link
Member

Should the "Paste as" command have a "markdown link" option? I only see plain text and HTML.

@roblourens
Copy link
Member

Also, it might be nice to have a mode where it never inserts markdown links by default, but does show the paste widget which gives me the option. With "never", I don't see that widget.

@bamurtaugh bamurtaugh removed their assignment Jan 23, 2024
@mjbvz
Copy link
Collaborator Author

mjbvz commented Jan 23, 2024

@roblourens Paste as currently only shows this open if you have a valid url in the clipboard. If you have copied a url and still aren't seeing the option, please open an issue. I also considered always showing it but that kind of overlaps with our existing markdown link snippet

@aiday-mar aiday-mar added this to the December / January 2024 milestone Feb 6, 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.
Projects
None yet
Development

No branches or pull requests

4 participants