Using the Clipboard

/ Published in: JavaScript
Save to your folder(s)

Functions to use the clipboard.

Requires a Flash file for non-IE browsers: see [](
Remember to set `config.Clipboard.pathToFlash` accordingly.

`Clipboard.copy(strToCopy)` puts strToCopy onto the clipboard
`Clipboard.copySelection()` puts the text that the user has selected onto the clipboard
`Clipboard.paste()` returns the text from the clipboard (only works in IE)
`Clipboard.clear()` clears the clipboard (or sets it to a period if it can't set an empty string)

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.