Skip to content

WPJohnny-plugins/code-click-to-copy

Repository files navigation

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.

Features

  • Easy Aim: Click anywhere on text block to copy entire text, no need to aim for tiny text or clipboard icon
  • Tooltip Customization: Change tooltip text and colors
  • Custom CSS Classes: Apply copy function to any content block, not only code blocks
  • I18N Support: Full internationalization support
  • Mobile Friendly: Works perfectly on mobile devices
  • Lightweight: Minimal impact on page load

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

Configuration

After activation, go to Settings > Code Click to Copy to customize:

  • Tooltip background color
  • Tooltip text color
  • Custom tooltip text
  • Custom CSS classes for copy functionality

Changelog

Version 1.0.1

  • Added comprehensive I18N support
  • Improved translation capabilities
  • Enhanced tooltip customization options
  • Better mobile compatibility

Version 1.0.0

  • Initial release
  • Basic click-to-copy functionality
  • Simple tooltip system

Support

For support and feature requests, please visit WPJohnny.com or create an issue on GitHub.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This plugin is released under the GPL v2 or later license.

About

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

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages