[ZeroClipboard

0 views
Skip to first unread message

Denna Repaci

unread,
Jun 12, 2024, 5:36:33 PM6/12/24
to kottmiribul

I'm currently working on releasing a nice front-end to [ ]( " target="_blank). PasswordUtility.net is an OSS tool that allows users to check their passwords' strength. You can also generate strong passwords using the same tool. If you're ever stuck for a password, head over to the site and give it a go! There's also a funky API and free OSS library release as NuGet package so you don't have to re-invent the wheel.

ZeroClipboard


Download >>>>> https://xiuty.com/2yEAYS



With the shameless plug out of the way, I'll get to the chase. How do you add a copy-to-clipboard feature to your site? Some popular sites such as Azure and GitHub offer this feature too. This feature can used every time you want to minimize user effort when copying complex data/values.

It turns out that it's quite simple to add this through a 3rd party library that works consistently cross-platform. The library that does all the magic, so you won't have to, is called: Zero Clipboard. You can find the code repot of this Open Source project on [GitHub]( " target="_blank). But what is Zero Clipboard?

The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface. The "Zero" signifies that the library is invisible and the user interface is left entirely up to you.

Ensure that the source to the file points to the right location. Usually in ASP.NET MVC, the JavaScript files reside in **\Scripts**. In that case, your script source should look like this src="/scripts/zeroclipboard.js". But we all know that it's not good practice to directly reference JavaScript files and instead you should be minifying and bundling them; right, RIGHT?

The simplest way to set and test the sample page is to create a folder with an index.html page. You should also place the .swf movie in the same location. The HTML code is shown below with a placeholder for the ZeroClipboard script

795a8134c1
Reply all
Reply to author
Forward
0 new messages