Linux 软件免费装
Banner图

Code Click to Copy

开发者 treeflips
zeroneit
更新时间 2025年7月16日 00:24
捐献地址: 去捐款
PHP版本: 4.9 及以上
WordPress版本: 6.8
版权: GPL-2.0+

标签

html code syntax copy pre

下载

0.1.2 0.1.3 0.1.4 1.0.0 1.0.1 0.1.0 0.1.1 0.1.5

详情介绍:

Simple plugin that automatically copies content in <pre> and <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 any aiming, just click anywhere on the code block and it copies the whole thing. Customizable hover tooltip lets you know it's copied. For sites sharing code-commands, this plugin will save users time from having to highlight and copy-paste bits of text back and forth. It's especially helpful for large globs of code that scroll off-screen, or when copying on your mobile phone. I've added more features to make it more helpful. Features:

安装:

  1. Install easily from your dashboard Add Plugins page or manually download the plugin and upload the extracted archived to the /wp-content/plugins/ directory.
  2. Activate the plugin through the 'Plugins' menu in WordPress.

常见问题:

Does this plugin work with newest WP version and also older versions?

Yes, this plugin works perfect with the latest version of WordPress! It also works with older versions as well but you should always run the latest WordPress and PHP version for best security and performance. This plugin is used in my critical sites so you can be assured it works perfect.

Will this plugin slow down my site?

No. It's coded extremely lightweight. The plugin CSS and JS is only 1.7KB total, and inlined in your site footer. No extra CSS or JS files are loaded. It does only the essential function and nothing more. No heavy PHP processing or database queries. I'm an absolute speed fanatic.

Do you plan to add more features?

Not unless someone wanted to pay for my development time and costs. This was intended as a free community plugin.

How do I style the copy block?

You can customize the tooltip through the admin settings at Settings > Code Click to Copy. You can change:

  • Tooltip background and text colors
  • Custom tooltip text messages
  • Apply copy function to other CSS classes
  • Custom tooltip CSS class for advanced styling For advanced CSS customization, you can style the "codeCopyTooltip" CSS class or your custom class.

Any known incompatibility issues?

One user reported it didn't work on his DIVI site through DIVI's own "code" block mechanism.

更新日志:

1.0.0 0.1.5 0.1.4 0.1.3 0.1.2 Updated description. 0.1.1 0.1.0