triggerdotdev / jsonhero-web

JSON Hero is an open-source, beautiful JSON explorer for the web that lets you browse, search and navigate your JSON files at speed. 🚀. Built with 💜 by the Trigger.dev team.
https://jsonhero.io
Apache License 2.0
9.01k stars 482 forks source link

fix: Ctrl+A should select all text in CodeEditor #163

Closed il3ven closed 11 months ago

il3ven commented 1 year ago

This PR adds the functionality that if CodeEditor is rendered on screen then Cmd+A/Ctrl+A will select all the text inside CodeEditor.

For this solution I have added a event listener on window. Here a global event listener is the last option. I was not able to find a CodeMirror solution. Even if there is a CodeMirror solution we will need to enable cursor so the user knows when Ctrl+A will work.

/claim #162

il3ven commented 11 months ago

Although this PR is ready but a similar PR has been merged already (#164) so closing this one.