-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
not working for script tags #14
Comments
Is it fixed if innerHTML is changed to innerText? Most likely it should be working... |
http://codepen.io/nkbt/pen/eJrdWG?editors=0010 @IonutLaceanu, that works just well for me with your example. Maybe you are doing something else oddly? Click first button to copy script content to state, then second button to copy it to clipboard |
@nkbt, it works because you are copying the content of the script tag. You'll see that it doesn't work. I'll try with inner text and see if it works. |
@nkbt, I can confirm that it works like a charm with |
Well, yeah, if you paste |
Fix sudodoki#14: replace innerHTML with innerText
Might be the issue with nkbt/react-copy-to-clipboard#15 too |
@nkbt will try to find time this week |
Thanks, @sudodoki. I think you can also try to create a |
Should be fixed by #19 let me know, if latest master works for you and I'll publish version. @nkbt @IonutLaceanu. |
Considering this closed now. Please, let me know if something still doesn't work for you. |
I want a copy button for a text which basically is a script tag.
Something like:
However, it doesn't work, becuase you are using innerHTML, which basically inserts the script inside the page.
The text was updated successfully, but these errors were encountered: