-
Notifications
You must be signed in to change notification settings - Fork 71
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
Fails to copy to clipboard when value is JavaScript #72
Comments
Can you please create a live demo I can check ? On Wed, Jun 24, 2015 at 1:49 PM, Axel Ferdinand [email protected]
|
In my prototype, I'm pulling HTML, SCSS and JS from individual files, but the output is as illustrated in this demo: |
You should not use ng-init for that, your code is invalid. you can see the On Wed, Jun 24, 2015 at 2:20 PM, Axel Ferdinand [email protected]
|
OK, I see. How can I copy the code inside these elements then: <'pre rel="HTML"'><'code class="language-markup" id="markup"'> CODE GOES HERE <'/code'><'/pre'> Can't get my head around how to use your script to copy content inside pre or code element. |
I'm not sure I follow you, you can use any value that is stored in your On Wed, Jun 24, 2015 at 2:49 PM, Axel Ferdinand [email protected]
|
Let's say I have put some code inside a <'pre'> or <'code'> element. If I give the <'code'> element a ng-model, it is by default emptied by Angular, and I'm not able to copy the content from it. I simply wan't to be able to copy ANY content from inside a <'code'> element. How can I do that, using your script? |
I'm creating a "copy code" function that currently is working perfectly copying HTML and SCSS. When I do an attempt to copy a field with JS, nothing happens. If I replace the JS with something else (text, HTML or CSS i.e) it works perfectly. How can we make the script copy JS code?
The text was updated successfully, but these errors were encountered: