Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add syntax highlighting #50

Closed
flimzy opened this issue May 24, 2022 · 2 comments
Closed

Add syntax highlighting #50

flimzy opened this issue May 24, 2022 · 2 comments

Comments

@flimzy
Copy link
Contributor

flimzy commented May 24, 2022

@samlown found https://ace.c9.io/, which is a syntax-highlighting code editor in JS, although it's perhaps more heavy-weight than we need, and it requires a pretty big overhaul of how we handle text input. And it's really only suited for one of the three windows we offer (the input window). Still not out of the question.

In searching, I found this post that offers another option for syntax highlighting: https://css-tricks.com/creating-an-editable-textarea-that-supports-syntax-highlighted-code/

Some more investigation is probably warranted to determine the best way to add syntax highlighting to the input and output windows (and maybe the JWT window).

@samlown
Copy link
Contributor

samlown commented May 24, 2022

Ace does look rather large and complex... we're not just after highlighting though, we need text-editor like features that help you write YAML or JSON documents. Even basic things like pressing "enter" and the next line being aligned with the previous is a big plus in experience. Check this one out for another example: https://jsonformatter.org/json-viewer. There must be an open option somewhere!

@samlown
Copy link
Contributor

samlown commented Jul 18, 2022

This is now solved thanks to the Monaco editor.

@samlown samlown closed this as completed Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants