mholt / json-to-go

Translates JSON into a Go type in your browser instantly (original)
https://mholt.github.io/json-to-go/
MIT License
4.48k stars 473 forks source link

Use placeholder for emptyInputMsg and emptyOutputMsg #100

Closed earthboundkid closed 2 years ago

earthboundkid commented 2 years ago

The page uses JS to put in emptyInputMsg and emptyOutputMsg, but if you paste too fast while it's loading you can end up with the empty message at the bottom of your input. In modern HTML, this is built into the browser now, so there's no need to handle this manually in JS. Just change the input tag to <input placeholder="Paste JSON here"> and browsers will handle it all automatically.

mholt commented 2 years ago

Thanks, but I just tried and that doesn't seem to work for <div> tags.