I'm trying to create a copy-to-clipboard button for my company's tiddlywiki. I have tried with multiple google solutions like clipboard.js and most recently with this code (found on google!):
<input id="copyTarget" value="Some initial text"> <button id="copyButton">Copy</button><br><br>
<span id="copyTarget2">Some Other Text</span> <button id="copyButton2">Copy</button><br><br>
<input id="pasteTarget"> Click in this Field and hit Ctrl+V to see what is on clipboard<br><br>
<span id="msg"></span><br>
When i paste this into my Tiddlywiki and i try to use it, it gives me the following: "<input id="copyTarget" value="Some initial text"> <button id="copyButton">Copy</button><br><br> <span id="copyTarget2">Some Other Text</span> <button id="copyButton2">Copy</button><br><br> <input id="pasteTarget"> Click in this Field and hit Ctrl+V to see what is on clipboard<br><br> <span id="msg"></span><br>"
This is of course a bit of the code that is already in the Wiki. I've also tried wrapping the code in <html>....<html>, but that didn't work either.
Is there an easier way to create this function into tiddlywiki?
Thanks!