YYsuni / react18-json-view

JSON viewer for react18
https://jv.yysuni.com/
MIT License
236 stars 15 forks source link

Copy strings without quotes #16

Closed marcklingen closed 9 months ago

marcklingen commented 9 months ago

The users of my project often copy individual string values from the json rendered with react18-json-view (I got great feedback on the new json view by the way 🙏). I'd like to customize the copy behavior of strings to not include double quotes.

Is this a better default copy behavior for everyone (changing the default) or what are your thoughts on supporting custom stringifyForCopying functions?


Screenshot 2023-09-26 at 15 02 41

marcklingen commented 9 months ago

(I'd be happy to contribute the change if you agree that it is a better default)

YYsuni commented 9 months ago

You make a valid point. The default behavior for copying strings should be to remove the quotation marks, and it would also be beneficial to provide users with a customization option.