CodeBlock is a free WordPress plugin that enables visitors to copy (programming) code to their clipboard with a single click. It features:
- Makes use of short-codes
- Works with stylized code. That is it only copies the code not the underlying HTML elements
- Spam free. It will never bag (ehm, bug) you for ratings, permissions…etc.
To see it in action take a look at this page.
Download and Install
Download the zip file and extract it to your WordPress plugins folder. Activate the plugin in the WordPress plugins section.
Simply paste your code between
short codes within your post. By default your code will be wrapped within a ‘pre’ block. However, you can specify a HTML element using the ‘tag’ option, e.g.