/code-click-to-copy

Copies <pre> and <code> tags automatically to clipboard.

Primary LanguagePHP

Code Click to Copy

Click anywhere within code tags to automatically copy to clipboard.

Simple plugin that automatically copies content in <code> tags to clipboard (when clicked). Other plugins out there do the same but create a little [COPY] button that you have to aim for. Mine doesn't require aiming your cursor at any button, simply click anywhere on the code block and it copies the whole thing.

With all the guides out there sharing code-commands, especially on this site, it’s about time somebody made a plugin to save us all a little time from having to highlight and copy-paste bits of text back and forth. It’s especially time-saving when trying to copy large globs of code that scroll off-screen or trying to manage on your mobile phone.

Installation

  1. Install easily with the WordPress plugin control panel or manually download the plugin and upload the extracted folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the "Plugins" menu in WordPress