Closed kennyparsons closed 4 months ago
Can highlightjs highlight editable text?
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.
tbh, I think most of the time, the config will be written elsewhere and copy pasted into anyways.
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
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.
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
You should really look into this library.... https://ace.c9.io/ It is wonderful....
EDIT: Nevermind, looks like foozzi implemented that library. GJ
maybe we could use Monaco the vscode editor
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/