Skip to content
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

Unable to use \r \n #15

Closed
phil3903 opened this issue Feb 9, 2016 · 6 comments
Closed

Unable to use \r \n #15

phil3903 opened this issue Feb 9, 2016 · 6 comments

Comments

@phil3903
Copy link

phil3903 commented Feb 9, 2016

My copy needs to respect new lines and returns. Is there support for this?

@nkbt
Copy link
Owner

nkbt commented Feb 9, 2016

Hm that's interesting. Are you copying from textarea or something else?

@nkbt
Copy link
Owner

nkbt commented Feb 9, 2016

Feel like sudodoki/copy-to-clipboard#14 can fix it.

@phil3903
Copy link
Author

phil3903 commented Feb 9, 2016

Yeah I attempted this by using a .replace() on my string, replacing commas with either \n or \r, before I give the string to the copy component. The string console logs properly (with actual returns) before I attempt the copy, but the \r and \n are removed upon copy. This is being done directly in the javascript, not in a textarea.

I'll check out copy-to-clipboard#14.

@sudodoki
Copy link

Probably, update of copy-to-clipboard dep will fix it.

@phil3903
Copy link
Author

This is true. Just tried using copy-to-clipboard 2.0.0 by itself. \r and \n are properly supported.

@nkbt nkbt mentioned this issue Feb 11, 2016
@nkbt nkbt closed this as completed in #16 Feb 11, 2016
@nkbt
Copy link
Owner

nkbt commented Feb 11, 2016

published 4.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants