Sorry for the low level of research but the media JS code was always a mystery to me, and googling doesn't show any current and reasonable answers.
The scenario is simple, I have a form in which I want to let the user either upload a new image or select one from the media library. Easiest way seems to be to open the add media modal and let it handle the actual upload if needed. so all I need is
- The easy part - open The media modal.
- The harder part - get the id and maybe the url of the selected media when it closes
Is it even possible without extending the modal in some way? I can probably live with the default text on the buttons, but it will be nice to change this as well.