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

Copy strings to clipboard without quotes #1002

Closed
NicoWeio opened this issue May 21, 2019 · 4 comments
Closed

Copy strings to clipboard without quotes #1002

NicoWeio opened this issue May 21, 2019 · 4 comments

Comments

@NicoWeio
Copy link

What problem does this feature solve?

I find it really annoying how copied strings from the data inspector always include double-quotes. Should that really be the default behaviour?

What does the proposed API look like?

At the moment, the clipboard value comes from here:
https://github.com/vuejs/vue-devtools/blob/21552134f022be2b8976d205a5c6a23f5ef77fc7/src/devtools/components/DataField.vue#L474
https://github.com/vuejs/vue-devtools/blob/591c1c235f43ab201d4ca5c1e2ab00be4ca3b46f/src/util.js#L616
https://github.com/vuejs/vue-devtools/blob/591c1c235f43ab201d4ca5c1e2ab00be4ca3b46f/src/util.js#L115

There would be many ways to change that behaviour, but first I would like to know if you agree.

@Akryum
Copy link
Member

Akryum commented Jun 26, 2019

We actually copy the JSON representation of the value.

@NicoWeio
Copy link
Author

I see. Copying all values in their plain form instead of their JSON representation might be a useful setting, though.

@g-plane
Copy link

g-plane commented Dec 30, 2020

Can I submit a PR for adding a setting for this option?

@Kapcash
Copy link

Kapcash commented Dec 14, 2021

Still waiting for this feature!
I do expect the copy to actually copy the plain value if it's a primitive (string, number, boolean...) and a JSON representation for any other type.

This would do a nice "Good first issue" PR I think :)

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

Successfully merging a pull request may close this issue.

4 participants