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

Syntax highlighting #5

Closed
fredsted opened this issue Nov 17, 2016 · 8 comments
Closed

Syntax highlighting #5

fredsted opened this issue Nov 17, 2016 · 8 comments

Comments

@fredsted
Copy link
Collaborator

Basic syntax highlighting for various languages:

  • JSON (obviously)
  • XML

Decide on which library to use:

https://highlightjs.org
http://prismjs.com

@yepher
Copy link

yepher commented Nov 17, 2016

Ace is a good and easy way to do it. Also make it easy to collapse and expand sections. Here is an example of it.

fredsted added a commit that referenced this issue Jul 16, 2017
@micsco
Copy link
Contributor

micsco commented Mar 23, 2019

@fredsted have you thought about how you'd like this to be implemented? This is something I might have a go at this weekend.

@fredsted
Copy link
Collaborator Author

@micsco I've been thing of using an editor component like Ace as was suggested, as a bonus I think it also supports other formats like XML which would be really handy. Not sure how well it fits with the existing Angular app, it's not very well written right now so might have to move some things around for something like Ace to fit in.

@micsco
Copy link
Contributor

micsco commented Mar 23, 2019

What about something like PrismJS?

It's not an editor, but I'm not sure there are editing needs for webhooks?

@micsco
Copy link
Contributor

micsco commented Mar 23, 2019

Another option is HighlightJS.

@fredsted
Copy link
Collaborator Author

I wonder if there's any package that can do formatting as well? Couldn't find anything about it on the PrismJS or HighlightJS website. Right now there's only JSON formatting, but lots of users also post XML to Webhook.site. Something that could auto-pretty print various formats would be neat.

@micsco
Copy link
Contributor

micsco commented Mar 23, 2019

Looks like we may have to add formatting for XML separately. I'll create a ticket to track it.

@micsco
Copy link
Contributor

micsco commented Mar 23, 2019

I've created #60 to track XML formatting/pretty printing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants