genkit icon indicating copy to clipboard operation
genkit copied to clipboard

[Dev UI] Convert multi-line strings to JSON-escaped quotes when pasting into input box

Open mbleigh opened this issue 1 year ago • 0 comments

It would be really handy for the input editor if, when you paste a multiline string, it automatically converted it to a JSON string. So i paste:

hello world
i am not "valid JSON" per se

and it turns it into

"hello world\ni am not \"valid JSON\" per se"

I asked an AI to built a proof of concept: 🙂 https://codepen.io/mbleigh/pen/GRbmvrG

mbleigh avatar Aug 05 '24 22:08 mbleigh