Drag and drop support in PS

Is there any mechanism to support drop events in a UXP plugin? This would be extremely handy for a number of uses, such as allowing a user to drag and drop a bunch of files onto a plugin for batch processing.

The following doesn’t appear supported:
document.addEventListener("drop", (evt) => console.log("drop event", evt))

1 Like

I did get vanilla HTML DnD working but as there are no CSS animations in UXP it was clunky as hell and horrible UX.
I have the repo but as it was a year ago since I made a commit I’d have to take some time to find the relevant bits.

I did DnD in my Mask Checker. It allows users to rearange swatches. It should be possible if you want it within the same panel.

Sorry, I should have been more clear. I believe you can drag and drop HTML elements in the panel.

What I am seeking is the ability drag files externally from the computer (Finder / File Explorer) and drop them onto the plugin.

Ah got it. I never tried this one. But sounds usefull and I think it is frequently asked.

I’ve definitely heard others ask before and I know it was unsupported last I dug into it, but it’s been a while. I would think there would be a lot of cross platform value here across multiple Adobe apps.

Yes… I think UXP team is working hard doing great job. Adobe just don’t want to hire sufficient amount of developers for some mysterious reason… with yearly net profit $5.0B the UXP could have everything it needs …at least that is my impression from it. ¯\(ツ)/¯ …or am I missing something?

2 Likes

Agreed, the Adobe developers are doing a great job, especially with limited resources.

I’d love to see the company lean into UXP more. The return on investment seems very high - third party plugins add tremendous value and most of the development cost is external to Adobe. I frequently get queries and comments from customers that make it clear that they often adopt or stick with Photoshop specifically because their favorite plugins are not available for another program like Affinity.

1 Like

When I think about it more… you can either write your own code or stockpile cash and buy someone else successful proven code.

At the same time if most employees in management is rewarded significantly by Adobe stocks it motivates management to cut expenses and maximize profits ot keep their own stocks (rewards) very high…

Great for investing but it does not align with my job of programmer.