schenkd / nginx-ui

Nginx UI allows you to access and modify the nginx configurations files without cli.
MIT License
4.4k stars 271 forks source link

Enhanced Text Editor Functionality #21

Closed kennyparsons closed 4 months ago

kennyparsons commented 4 years ago

Would be great if the text editor was enhanced to support things like tabbing and basic syntax highlighting. Syntax highlights can be accomplished with https://highlightjs.org/

TheFehr commented 4 years ago

Can highlightjs highlight editable text?

kennyparsons commented 4 years ago

No, but the recommended method is to built the text editor + a preview. Much like github comments work. The "Write" tab and "Preview" tab.

The idea behind syntax highlighting is it can help identify errors in the nginx .conf file. Sublime text editor offers this and it's helped me quite a bit, as I often forget punctuation marks to complete each line.

LucaNerlich commented 4 years ago

tbh, I think most of the time, the config will be written elsewhere and copy pasted into anyways.

foozzi commented 4 years ago

Would be great if the text editor was enhanced to support things like tabbing and basic syntax highlighting. Syntax highlights can be accomplished with https://highlightjs.org/

Today I’ll try to finish the syntax highlighting and send pull request

schenkd commented 4 years ago

Hey @kennyparsons, great proposal with the multiple tabs. Had already started a first attempt with highlightjs in realtime to highlight the written code but this was connected with too many side-effects. Tab support is already solved by me and will be in the next release. If @foozzi implements a solution for hightlightning I will be happy to have a look at it.

foozzi commented 4 years ago

https://github.com/schenkd/nginx-ui/pull/24 sorry for 2 commits, forgot to remove the 'print()'

@schenkd and please delete this line https://github.com/schenkd/nginx-ui/pull/24/commits/a65f1458b2c2aa0e80859acc7f74df45f5a56e3a#diff-d13e648c450173d77b5e04da795274fdR17 cdn link for older styles

causefx commented 4 years ago

You should really look into this library.... https://ace.c9.io/ It is wonderful....

EDIT: Nevermind, looks like foozzi implemented that library. GJ

honeyspoon commented 3 years ago

maybe we could use Monaco the vscode editor