Cipboard and html links

I have this textfield. When user selects some text and presses a button I wrap the selected text in an html link and put the result on the clipboard. User can then paste the link into a blog editor or email app such as gmail.

The behaviour I’d really want however is the one you have nowdays in most borwsers when you copy a link from an html page and then paste it into a rich text editor on e.g. gmail. What happens then is that only the text itself is put on the clipboard but the browser keeps track of the underlying html so that when you post into a rich text editor you get a link and not just the text.
I was actually not aware of this browser feature myself until recently. So please note that I have already implemented the straightforward solution of putting the full html link on the clipboard and what I’m asking about is the special browser “html clipboard” that seems to be happening behind the scenes when you copy paste an html link.