Skip to content

1.0

Compare
Choose a tag to compare
@NajmAjmal-old NajmAjmal-old released this 20 Aug 18:24
· 7 commits to main since this release
df1cac4

Click-to-Copy - Release Notes

Features

1. Support for Buttons and Links

Introducing support for both buttons and links, with the ability to copy text to the clipboard. Use the class copy-button for buttons and copy-link for links. Include the data-copy-text attribute to specify the text to be copied.

Example:

<button class="copy-button" data-copy-text="Text to be copied">Copy</button>
<a href="#" class="copy-link" data-copy-text="Text to be copied">Copy</a>

2. Tooltip Integration

Add tooltips for user clarity. Use the data-tooltip attribute to include a tooltip when hovering over the copy elements.

Example:

<button class="copy-button" data-copy-text="Text to be copied" data-tooltip="Click to Copy">Copy</button>

3. Enhanced User Experience

Users can now click a copy element, and the selected text will be copied to the clipboard.

4. Compatibility Enhancements

The script acknowledges that document.execCommand('copy') might not work in all modern browsers due to security restrictions. Explore alternatives, such as the Clipboard API, if needed.

Get Started

Visit the GitHub repository to access the latest release and start integrating click-to-copy functionality into your projects today!

License

This project is licensed under the MIT License.