nginx-ui icon indicating copy to clipboard operation
nginx-ui copied to clipboard

Enhanced Text Editor Functionality

Open kennyparsons opened this issue 5 years ago • 8 comments

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/

kennyparsons avatar Jun 25 '20 16:06 kennyparsons

Can highlightjs highlight editable text?

TheFehr avatar Jun 25 '20 16:06 TheFehr

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.

kennyparsons avatar Jun 25 '20 17:06 kennyparsons

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

LucaNerlich avatar Jun 25 '20 20:06 LucaNerlich

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

foozzi avatar Jun 26 '20 00:06 foozzi

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.

schenkd avatar Jun 26 '20 05:06 schenkd

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

foozzi avatar Jun 26 '20 12:06 foozzi

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

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

causefx avatar Jul 12 '20 03:07 causefx

maybe we could use Monaco the vscode editor

honeyspoon avatar Jun 21 '21 01:06 honeyspoon