Link to modify current media

I am now looking for a piece of code which allows to modify the (html) media attached to a item directly from this item.

This is tricky because the media does not have the same ID than the item. And there could be several media for the same item.

From item 1 I want to access media with id 2 (/admin/media/2/edit#media). If item 1 has several media attached, I want the first one (or the one with “xxx” in the title").

Any idea how to achieve this?

Up! :grinning: