🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

copiq is a copy to clipboard plugin for jQuery library which allows you to copy and paste any text while preserving the text structure and basic formatting (e.g. bold and italic).

Clipboard

Documentation

jquery.copiq

Cross browser copy to clipboard plugin.

Install

<script src="jquery.min.js"></script> <script src="../jquery.copiq.min.js"></script>

or

bower install copiq

Usage

$(selector).copiq();

Configuration

parent

common wrapper on selector and content element

default: "body" options: string

content

container which to be copied, relatively from the parent element

default: "" options: string

onSuccess

when the copy is successful

default: {} options: function($element, container, selection)

onError

when the copy is not successful

default: {} options: function($element, container, selection)

Demo

codepen.io/mel/full/VzKKjz

License

@author Mario Vidov
@url www.vidov.it
@twitter MarioVidov
MIT license


You May Also Like