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

Extend syntax highlighting with ACE for pre-request script textarea #235

Closed
aeeed99 opened this issue Oct 31, 2019 · 14 comments · Fixed by #379
Closed

Extend syntax highlighting with ACE for pre-request script textarea #235

aeeed99 opened this issue Oct 31, 2019 · 14 comments · Fixed by #379
Assignees
Labels
feature New feature or request wip Work in progress

Comments

@aeeed99
Copy link
Contributor

aeeed99 commented Oct 31, 2019

Related to #218

Is your feature request related to a problem? Please describe.
No syntax highlighting might confuse users in pre-request scritps. It could look like they're writing in plaintext, and common typos won't be as apparent.

Describe the solution you'd like
Simple syntax highlighting. Things like basic javascript types should be highlighted. Nothing too fancy needed.

Describe alternatives you've considered
Going without, but syntax highlighting looks more l33t.

Additional context
@sblasa has done some research on this after reaching out on #91

@aeeed99
Copy link
Contributor Author

aeeed99 commented Oct 31, 2019

@sblasa are you still interested in taking this?

@liyasthomas
Copy link
Member

HighlightJS is already implemented in the PW.
Introduced in #142
https://highlightjs.org/

@aeeed99 aeeed99 changed the title Syntax highlighting for pre-request script Extend HighlightJS for pre-request script textarea Oct 31, 2019
@liyasthomas liyasthomas added the feature New feature or request label Oct 31, 2019
@sblasa
Copy link

sblasa commented Nov 1, 2019

@sblasa are you still interested in taking this?

@liyasthomas and @nickpalenchar yes, I'm still interested in this. So, I'm using hiighlight.js instead, since highlight is already there; therefore use that. to extend syntax highlighting for pre-request script.

@liyasthomas
Copy link
Member

@sblasa thought I should ping you to get the latest updates on this issue...! If you need any help, ping me.

@sblasa
Copy link

sblasa commented Nov 6, 2019

@liyasthomas Hi! I pulled down the latest changes--and running on my local. I'll ping you shortly for some help. Thanks!

@liyasthomas liyasthomas added the wip Work in progress label Nov 8, 2019
@sblasa
Copy link

sblasa commented Nov 11, 2019

@liyasthomas Hi, noticed that the reference for highlight.js will be removed from pages/index.vue with Replace highlight.js with ace editor #292 . So we probably won't use highlight.js to create the feature since it has been removed? Use Ace Editor instead? Thanks!

@liyasthomas
Copy link
Member

liyasthomas commented Nov 11, 2019

@sblasa sorry for the delayed response!
HighlightJS is being replaced with ace. Its implementation is much simpler and have out of the box support for textarea. Please use ace for pre-request scripts.

Or wait untill #292 is merged so you don't have any trouble importing lib.

@liyasthomas liyasthomas changed the title Extend HighlightJS for pre-request script textarea Extend syntax highlighting with ACE for pre-request script textarea Nov 11, 2019
@sblasa
Copy link

sblasa commented Nov 12, 2019

@liyasthomas Okay, thanks for confirming. 👍

@liyasthomas
Copy link
Member

@sblasa ace is in production (master branch) now! Refer the code snippets from there.

@AndrewBastin
Copy link
Member

Yeah, I tried implementing two-way binding (v-model) onto the Ace Editor component (components/ace-editor.vue) but it had some issues with the re-render (cursor keeps staying in the first col of first line), so I dropped it...

Can somebody go into fixing that ? Or can we move Ace Editor stuff to a library (like a Ace Editor wrapper for Vue)

@liyasthomas
Copy link
Member

I think v-model doesn't work on Ace. I too tried and failed doing it.

@AndrewBastin
Copy link
Member

Can we look into libraries providing Vue wrappers from Ace ?

@AndrewBastin
Copy link
Member

Ooooh, if nobody is working on it, I will try implementing it and migrate the necessary views.

If nobody is working on it, can I get an assign ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request wip Work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants