Zero Clipboard

Component ID

1160802

Component name

Zero Clipboard

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

29952

Component created

Component changed

Component body

This module is a wrapper for a Javascript library called Zero Clipboard, which allows content to be copied to a user's clipboard, when a specific area of the page is clicked on.

Requirements

This module requires that the Libraries API module be installed.

Explanation

Basically, this module would build a mapping between HTML elements that may be clicked (to copy some text to clipboard), and the texts that are to be copied.

There are 2 ways to create this mapping:
1- Through the admin interface (at the module settings page)
Each line corresponds to one entry in the mapping.

[css-selector-1]|[text-to-be-copied-1]
[css-selector-2]|[text-to-be-copied-2]
[css-selector-3]|[text-to-be-copied-3]

2- Dynamically using JS on the page
Simply call Drupal.zeroClipboard.process(selector, clipCallback)
(The second argument can either be the string to be copied, or a function callback that will return the string to be copied.

Use Guide

//TODO

Version 6.x-1.x To Be Deprecated

An upgrade path will (hopefully, I can't promise) implemented from 6.x-1.x to 6.x-2.x. After that, version 6.x-1.x will be deprecated. Everyone is strongly recommended to use version 2.x as it is more flexible and extensible.

Version 6.x-1.x Has Been Deprecated!