Add a button to Confluence attachment to edit it in a modal view

Hi,
I’m trying to build and add-on to access to Confluence attachments, add a button to open the attachment in a modal to perform changes to the attachment and save the changes back.
I’m kind of lost, what methods/modules should I use? Web-item?
Can anyone point me to the right documentation or sample?

Thank you

Hi,

You can use web-item for the button/link and use web-resource for the dialog/js.
Set your resource context to viewcontent.
Bind your js to open the dialog on button/link click event.
This Tutorial good enough to guide you.

Thanks