Pasting HTML content: works on laptop but drops links on mobile

In the demo editor on the home page of ProseMirror.net , if i paste HTML content with anchor links (eg: the paragraph below the demo editor) then the anchor links are preserved as long as I’m working on my laptop and Chrome browser.

But, if I do the same paste on my mobile phone (android 10 and chrome browser), then the anchor link url information is missing.

Is this a bug? I thought I would post here to check first before creating a github issue.

Could you check what kind of HTML the different browsers provide in dataTransfer when pasting this? Also relevant is where you copied the content.

I google searched the event dataTransfer but I don’t really know how to see that event on my laptop browser. And what you really want to see is my phone browser which is yet another step that I don’t know how to do…

As for the source of the HTML, I tried several sources and tried to find “clean” sources. I tried

  1. wikipedia, and

  2. the paragraph below the demo editor on your own home page and

  3. I even tried the text “see more examples.” that sits inside the demo editor itself – they all failed.

I tried the Trix browser and that failed too. But when I tried the Quill editor then the paste preserved the html anchor link (for the content that comes from inside your editor “see more examples.” )

The easiest way to get the HTML would be to set up a page with a contenteditable element, and have a "paste" event handler on that that takes event.dataTransfer.getData("text/plain") and puts it somewhere on the page where you can see it.

Seems like this is a real bug, so I created a github issue for it: