Is it possible to customise how a hyperlink from an Edge browser appears when pasted in Word/Outlook/OneNote/Teams etc? Specifically in relation to page bookmarks.
i.e. If a copy a hyperlink https://www.foo.bar from Edge and paste it into a Teams chat window, it will often take the Page Title from that page as the linked text it pastes. In html this would be
<a href="https://www.foo.bar">Foo Bar homepage title</a>
I'm wondering if I can configure my page to somehow hint to Edge to copy bookmarked section on the page differently, e.g.
<a href="https://www.foo.bar#InterestingSection">Foo Bar homepage - Interesting Section</a>
<a href="https://www.foo.bar#InterestingSection2">Foo Bar homepage - Second Interesting Section</a>
Is that possible? perhaps by adding attributes to the bookmark anchors? i.e. such as
<a name="InterestingSection" title="Interesting Section"/>
or something similar?
Any pointers to MS documentation on this would be appreciated
Unfortunately, it seems to be impossible, as text is retrieved from <title>
content when you copy the link from the address bar (if you copy from the page body, only full URL is copied).
The only possible workaround I can see is to assign an onclick
event to your bookmark and then let it change the page title to the bookmark's name on user click.
But if a user directly accesses the URL with bookmark name, the tile remains to be the original page title, as the user didn't click on that bookmark. In this case, when the user copies the URL in the address bar, the title won't reflect the bookmark name.