click2copy is a WordPress shortcode plugin that uses clipboard.js for copying HTML, PHP, JavaScript, CSS or any other programming language code snippets to your clipboard with the click of a button.
WordPress should be installed on your website, then you can grab the latest copy from our GitHub release page
Download the latest release
Install the plugin using the following guide for installing a WordPress plugin manually.
Activate the plugin
- Visit the 'Settings > click2copy' page, set your preferred CSS Classes for the pre and button class, and your preferred Button Text, then save the settings.
- Insert your code content with the opening and closing tags in any Page or Post: [c2c id="code1"]content[/c2c]
Options:
- pclass: This applies a custom class to the <pre> HTML tag for styling purposes (default: c2cpre)
- bclass: This applies a custom CSS class to the <button> HTML tag for styling purposes (default: button-c2c)
- button-text: This allows you to set the button text label (default: Copy)
The shortcode can be applied multiple times in either the Page or Post Editor using the following syntax: [c2c id="uniqueID"]content[/c2c].
Attributes:
- id: This identifies the code being copied, and needs to be unique for each code snippet if you have more than one instance on the Page or Post.
[c2c id="code1"]
<div class="row">
<div class="col-md-9 col-xs-12 col-sm-12">
<div class="mod-blockquote">
A blockquote highlights " important information, " which may or may not be an actual quote. A blockquote highlights " important information, " which may or may not be an actual quote. A blockquote highlights " important information, " which may or may not be an actual quote.
It uses distinct styling to set it apart from other content on the page
</div>
</div>
</div>
[/c2c]
- clipboard.js - The Javascript Library |
- PHP - The Language
- WordPress - The CMS
- HarryJ.us - The Person
- Coffee - The Fuel