-
Notifications
You must be signed in to change notification settings - Fork 10
Description
@aksm this is going to be a follow up ticket to #192
Many times we might need to have a tiny button on a side/surrounding an HTML element to allow the user (end user) to copy into its copy-pasta buffer easily data.
This can be used in the citation formatter but also on the Object Description (any Twig based, Custom Metadata Formatter) to copy the URL of a IIIF manifest, a persistent URL, etc.
The idea would be to make a small JS drupal behavior that attaches to a CSS class and uses a data attribute to get the to-be-copied value.
Browsers implement this differently. So other than the JS library, both CSL and the Custom Metadata Formatter would attach this library and we would need to add documentation for the former formatter so people know how to expose the HTML that allow the JS to attach itself to the HTML element.
Let me know if you have any doubts.
Thanks