lkrepp Posted May 6, 2021 Share Posted May 6, 2021 Hello, I am wanting to create a copy to clipboard button similar to what you would see on bitly.com when you want to copy your shortened url. Any tips? Link to comment
tuanphan Posted May 9, 2021 Share Posted May 9, 2021 On 5/7/2021 at 12:24 AM, lkrepp said: Hello, I am wanting to create a copy to clipboard button similar to what you would see on bitly.com when you want to copy your shortened url. Any tips? Add a Code Block >> Paste this code <p>Click copy to clipboard</p> <input type="text" value="Hello World" id="myInput"> <button onclick="myFunction()">Copy text</button> <script> function myFunction() { var copyText = document.getElementById("myInput"); copyText.select(); copyText.setSelectionRange(0, 99999) document.execCommand("copy"); alert("Copied the text: " + copyText.value); } </script> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
LUDLOW Posted June 14 Share Posted June 14 @tuanphan Could we please see a version of this to where a simple hyperlink/text could be clicked for copy? We would like to have specific anchor link URLs that could be more easily sharable. Like this:Click To Copy/Share This Section P.S. We're using SquareKicker for the anchor link generation. AJZ 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment