I used the write to clipboard event assigned to a button to copy dynamic text to the clipboard, however when I come to paste it to check, nothing has been copied. Here is the code:
<button id="btn1" class="btn" dmx-on:click="browser1.writeTextToClipboard('This is the text to be copied when Button is click with some dynamic data '+sc_pck_inactive.data.list_sites[0].site_name)">Button</button>
This works for me so I would suggest a couple of things to check. One is the browser/OS settings to make sure it allows copying to the clipboard. Also check you’ve uploaded all the Wappler scripts to the server.
Check the dev console to see if there are any errors there.
I practically followed the steps outline pad in a previous post and I have included the code generated, I still can’t get it load. is there anything that you see obvious in the code @sitestreet@Teodor
And yes all files have been uploaded. No error is generated on click.
I can’t see anything obvious. Have you cleared your browser cache? I still wonder if it’s a browser setting which is blocking access to the clipboard. Remember that the clipboard is in the OS and not the browser so the two need to be able to communicate with each other.
Still can’t get this to work. I am not sure if this is a BUG.
I am able to use similar functions on other websites allow you to copy text without any issues. So its not a browser settings or OS related.
Can anyone assist? I have provided screenshot and code thats being generation.
Is there a step thats missing? @Teodor?
@brad Are you able to share the header code that reference all the Wappler files? Maybe there is a line that I accidentally deleted when trying to merge two files together
What are you using for a local target? Sounds like the dmxBrowser.js file hasn’t been uploaded to the local server. Any errors in the browser console when trying from local target?
Correct, thanks for explaining. I just discovered that. Yes, I don’t have https setup on my local environment. As long as it works on the live site which it does thank it’s all good.