Forum Discussion
Announcing a new way to paste URLs, Link format!
Scott Arbeit Sadly, it never did what you describe of copying what you select. Try a URL with non-ASCII characters like https://en.wikipedia.org/wiki/Białystok. What used to get put on the clipboard was the text https://en.wikipedia.org/wiki/Bia%C5%82ystok. Now you get this plus the following HTML as well as two new link formats.
<a href="https://en.wikipedia.org/wiki/Bia%C5%82ystok">Białystok - Wikipedia</a>
What bothers me more is that Win+V is deceptive. I see the following yet this isn't what is pasted. There is no combination of Win+V and Paste Special. Even Ctrl+Shift+V is Edge specific.
Thank you, rshupak.
I'm not able to reproduce the behavior you describe on that URL (and I have tested other non-ASCII cases as well).
A few questions for you to better understand what you are experiencing:
- Which channel and build of Edge are you using? You can find both the build and channel in edge://version
- Where exactly (in which website, web app or Windows app) are you attempting to paste the URL?
- What is your default format setting in edge://settings/shareCopyPaste ?
- How are you attempting to perform the paste (ctrl+v, ctrl+shift+v or the right-click context menu)?
For example, when I use the "plain text" paste format here, I get: https://en.wikipedia.org/wiki/Bia%C5%82ystok. as you described I should.
Thanks very much,
Jared
- rshupakSep 16, 2020Iron Contributor
JaredB81 I tried this on Canary 87.0.641.0. I just checked dev 87.0.637.0 and it is the same.
Copy the URL from the address bar. If you find the IRI copied to the clipboard instead of the URL encoded form, I would be very surprised. Please confirm that you see the encoded URL that Anaheim has always copied.
I am a bit surprised that the UTF-8 encoded CF_HTML content writes the encoded URL to the A element href property. This should be able to handle an IRI but maybe there are plenty of broken apps. All the ones I use support IRIs so it bothers me to see the unreadable encoded URLs as nothing I have seen except the browser address bar reverses the process to display the IRI.
For the Text, Unicode Text, and OEM Text content that Edge places on the clipboard, I have tools to fetch the clipboard contents directly but these three formats can be seen by pasting into Notepad.
The CF_HTML is also retrieved by a tool. Here is what I see. Note that this site will want to corrupt the HTML so I will paste a screenshot.
On a related note, I cannot paste an image into this site from Edge canary. This used to work. I don't know if it is a bug introduced into the site, Edge, or both.
I don't have a tool to retrieve the two new link specific formats. The Office apps don't support those, at least not yet, so default Paste and Paste Special by choice use the CF_HTML which behaves exactly as expected and matches the HTML from the clipboard.
Pasting into this site with Ctrl+Shift+V does match the Unicode Text content. Ctrl+V behavior matches the CF_HTML content but could be one of the new link formats. I didn't look into it.
Not a single one if these variants will paste the IRI. I might even be OK with a link format that uses the encoded URL with the link target and the IRI with the link text. I can't say I never want the page title but I personally rarely want the text that the target itself uses as its title.
I mentioned the issue with IRIs only point out that Anaheim previously would not copy what the user sees. My major gripe is that I need any app that understands CF_HTML of presumably the new link clipboard types to support Paste Special if they will prioritize HTML over plain text, which any such app would presumably do. And when they do, such as the Office apps, is requires much more effort than just Ctrl+V which I believe is the point of the post to which I replied. My more serious gripe is that I use Win+V a great deal, more often than not with URLs, and there is no mechanism for Win+V and Paste Special. Maybe discuss this with the Windows team that just combined Win+V and Win+. to fill this hole.
I also want to mention, though you likely knew this, is that Copy Link in the context menu of right clicking on an HTML anchor element doesn't work as I would expect which would be to copy the link using the inner text as the title. Obviously this is complicated by the ability to have more than just text but it seems weird.
I also suggest updating https://support.microsoft.com/en-us/help/4575292/improved-copy-and-paste-of-urls-in-microsoft-edge to not suggest that Ctrl+Shift+V is a standard to be used in arbitrary apps.
And I purposely used Ctrl+V to paste the link to the support page above to give an example where I think it is less clear than if the URL itself were used.
Rich
- rshupakSep 16, 2020Iron Contributor
And to make my point with copying an anchor. I right clicked on the support link in my reply after it was posted. I will now use Ctrl+V to copy it here
https://support.microsoft.com/en-us/help/4575292/improved-copy-and-paste-of-urls-in-microsoft-edge
I would expect that if you support copying links with titles that you could re-copy links with titles and see the same result. In other words, if I send you a link, you should be able to reuse it i the same format. This works in Office. Specifically, I pasted the same link into an email that I sent to myself. When I received it, I right clicked and picked Copy Hyperlink. I then started a new email and pasted into that. No Paste Special. Just Ctrl+V. The link and title were preserved. I don't know if this is via the CF_HTML format it puts on the clipboard of the "Hyperlink" format that Office uses. Regardless of how it is done, I expect the same from Anaheim. Interop with Office on Windows should be considered so you don't invent a new wheel when Office has one.
Rich
- JaredB81Sep 16, 2020Former Employee
rshupak thank you for the details, Rich! We will look into it.
One follow-up questions for you - If you change the default to be Plain Text, does copy / paste work as you would expect (ie: how Edge used to handle non-ASCII characters in the URL)?
As for link elements within the HTML body, yes, we are aware that the enhanced formats do not yet apply. We are testing that behavior internally before we roll it out externally, but rest assured that was part of the plan (links will be handled consistently, in a holistic manner) and the setting, the "paste as" context menu options and the shortcut keys will all behave consistently for both URLs in the Address Bar and for links on the page.
Finally, I hear you on the Ctrl + Shift +V behavior for plain text and that it's not perfectly consistent. Ctrl + V is also imperfect in some cases. The web is a bit of a wild west with how paste is handled and as you point out, there are some Win32 apps that do their own clipboard manipulations as well. This is one of the reasons we offer the setting to revert back to plain text by default. If your most common work flows are on sites or in apps that don't behave as you would expect with the new Ctrl + V or the fallback Ctrl +Shift + V shortcut keys, you can revert to the previous behavior in Edge settings.In fact, that's why I'm particularly interested in how your particular example behaves when you change the default back to Plain Text.
Thanks again,Jared