How can I add an additional attach option to the portal?

The current placeholders Placeholders do not allow an app to modify the portal so I was wondering how the Dropbox App is able to display an additional attach option?

See picture below

Follow up question, how is the dropbox app also able to add additional Javascript to the portal page?