ClipboardJS

ClipboardJS

A modern approach to copy text to clipboard.

Copying text to the clipboard shouldn't be hard. It shouldn't require dozens of steps to configure or hundreds of KBs to load. But most of all, it shouldn't depend on Flash or any bloated framework.
That's why clipboard.js exists.

Default

Create a copy button, by just adding a data-toggle="clipboard" and a data-clipboard-target="#input" containing the id of the input element to the button.

Textarea

The same goes for a textarea.

Cut

Create a cut button, by adding the data-clipboard-action="cut" to the button.

Cut With Textarea

The same goes for a textarea.