I created dynamic web pages in Wix. I want a button so if I clicked the button, then the URL of the current page should be copied. So how to implement this?
another useful built in function is wix-window. Here you can us wixLocation.url to get the current url. Then use wixWindow to copy that retrieved url with wixWindow.copyToClipboard( )
Wishlist Page is the new official platform for requesting new features. You can vote, comment, and track the status of the requested features (requests from this page will be migrated to the new Wishlist soon).
You can use wix-location to retrieve the current URL: https://www.wix.com/code/reference/wix-location.html
then on button click, pass the url to an html component.
In the html component write code to copy to clipboard: https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_copy_clipboard
Trying to create a "copy page url" function on button click.
I understand how to use wix location but how does the following work: "then on button click, pass the url to an html component." ?
I am a bit stuck so any help much appreciated?
பகலவன் ,
another useful built in function is wix-window. Here you can us wixLocation.url to get the current url. Then use wixWindow to copy that retrieved url with wixWindow.copyToClipboard( )
Code can be found here https://www.wix.com/corvid/reference/wix-window.html#copyToClipboard