renderjson icon indicating copy to clipboard operation
renderjson copied to clipboard

Copy JSON after it has rendered

Open izahoor-vwks opened this issue 7 years ago • 2 comments

Hi,

Is there any option available to copy the JSON text after it has rendered. I tried to copy that and there are special characters that also get copied that are not required.

Regards

izahoor-vwks avatar Aug 16 '17 12:08 izahoor-vwks

Yeah, it would be nice to be able to select it and get the plain JSON text when you copy. But it's not set up to do that. It would be nice if there were a browser "copy" event we could tap into to adjust the text, but there doesn't appear to be (though I might have missed something). Another idea might be to render all the extra disclosure symbols using css content, because I think that doesn't get copied. But that would cause an API change (since the disclosure symbols would have to move into CSS instead of being stuck as inline text nodes).

I'll keep thinking about it…

caldwell avatar Sep 07 '17 09:09 caldwell

I've modified the code to insert an image instead of the special characters, it's much nicer in my opinion.

(I don't know what would be the right API for it)

laurentlb avatar Jun 19 '19 18:06 laurentlb