Plugins

Clipboard

Clipboard is a modern approach to copy text to clipboard No Flash. No frameworks. Just 3kb gzipped.

Installation

Clipboard is installed via NPM as a third-party dependency by referring to package.json . During the Theme Installation process, it is compiled by the Build Tools into the /dist/assets/vendors/clipboard directory.

Require Assets

To use Clipboard in your pages, you need to include the following dependency assets in the order shown.
				
					<!DOCTYPE html>
<html>
 <head>
  <!--Core styles-->
  <link href="/dist/assets/css/styles.css" rel="stylesheet"/>
 </head>
 <body>
  <h1>
   Hello world!
  </h1>
  <!--Core bundle script-->
  <script src="/dist/assets/js/core.bundle.js">
  </script>
  <!--Vendor script -->
  <script src="/dist/assets/vendors/clipboard/clipboard.min.js">
  </script>
  <!--Custom script -->
  <script src="/dist/assets/pages/plugins/clipboard/default.js">
  </script>
 </body>
</html>

				
			

Copy Value

Click the copy button to copy the input value below.

Cut Value

Apply data-clipboard-action="cut" attribute to cut the input value below.

Predefined Value

Add the data-clipboard-text attribute to the action button below and it will copy the value set on click.

Copy Text

Add the attribute data-clipboard-target to an action button with the static element's id to get it working.
This is a sample static text string to copy!