A toolbar for prism syntax highlighter which adds an option to copy and view source of the code
This is just a clone of prism toolbar which is located at this blog
.
With this plugin you can add the functionality of copying the code with one-click and can view source of the code.
Works with every browser
.
The copying functionality is based on the Zeroclipboard.
- Download the zeroclipboard.swf
- Download the source folder
- upload the files prism-toolbar.css , prism-toolbar.js, zeroclipboard.min.js and zeroclipboard.swf in your website hosting account(Upload both ZeroClipboard.js and ZeroClipboard.swf in the same folder else the plugin won't work)
- Use the script tags to include the prismtoolbar.js and zeroclipboard.min.js above the </body> and style tags to include prism-toolbar.css above </head> as follows
<link href='/prism-toolbar.css' type='text/css' rel='stylesheet' />
<script src='/prism-toolbar.js' type='text/javascript'/>
<script src='/zeroclipboard.min.js' type='text/javascript'/>
All the credits to it's owner.I am just providing source code to easily install this plugin
Credits to the author.
Notes
- While uploading the scripts and style include zeroclipboard.min.js,prism-toolbar.js and zeroclipboard.swf in same folder other wise the plugin wont work
- If you dont have space to host you can use the following scripts which are hosted on google drive
http://googledrive.com/host/0Bzpv595vATc9b3RLbUtzM0YzUGM/prism-toolbar.css
https://googledrive.com/host/0Bzpv595vATc9b3RLbUtzM0YzUGM/prism-toolbar.js
https://cdnjs.cloudflare.com/ajax/libs/zeroclipboard/1.1.7/ZeroClipboard.min.js