Skip to content

Add a Copy from UI JS library to Citations/Metadata Formatters #196

@DiegoPino

Description

@DiegoPino

@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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Field FormatterThe thing that glues the pieces and adds glitterJavascriptFavourite language of a PHP developerUI driven hintsShow stuff on screen so people have less guessing to doUXLike UI but with an XenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions