This time I will share jQuery Plugin and tutorial about jQuery Plugin To Handle Pasting & Parsing of URLs and Text – Paste, hope it will help you in programming stack.
Paste is a tiny jQuery plugin that handles pasting & parsing of URLs and text on your webpage and converts them into JavaScript objects.
How to use it:
1. Add jQuery library and the jQuery paste plugin to your web page.
1 |
< script src = "jquery.min.js" ></ script > |
2 |
< script src = "src/jquery.paste.js" ></ script > |
2. Create a clipboard on your web page.
1 |
< div id = "container-paste" |
2 |
title = "Try pasting a url" > |
3 |
< span class = "paste-status" ></ span > |
3. Style the clipboard.
06 |
background-color : rgba( 10 , 10 , 10 ,. 5 ); |
11 |
#container-paste.failed { background-color : rgba( 200 , 10 , 10 ,. 5 ); } |
4. Initialize the plugin.
1 |
$( "#container-paste" ).paste(); |
5. Default plugin options.
2 |
processing: "<i class='fa fa-cog fa-spin'></i>" , |
4 |
callback: function () {}; |
Change log:
2015-08-24
- Added ability to override paste.fail message & delay
This awesome jQuery plugin is developed by atomicinfotech. For more Advanced Usages, please check the demo page or visit the official website.