Accepting URLs as DragItem?

Hello, all!

I’m trying to add functionality to drag a URL from the address bar of a web browser (Chrome, Firefox, etc) into a window.

It doesn’t seem to be recognized as text. I also tried using the “RawData” with the “public.url” UTI, and that doesn’t seem to work either.


Thanks in advance!

Have you made a playground with an accept all drop to see what’s delivered?

What do you mean “recognized as text”?

If you only want to handle URLs and not regular text, you should be able to call AcceptRawDataDrop with “public.url”. When you receive the drop, pass “public.url” to RawData to get the page URL and “public.url-name” to get the page title (which may not be present).

Ah- the missing puzzle piece. I needed to add Me.AcceptRawDataDrop(“public.url”) to the Open event…