Wednesday, March 7, 2018

making a cool in-browser code editor with ace

For a long while, I've used an online editor and set of Perl CGI scripts to edit content on my site.

At first it was just a textarea, later I started using markitup to make it a more editor-y looking thing but to be honest I'm not sure what I got out of doing that.

But now I found out about Ace, a pretty fricking powerful editor, closer in look and feel to sublime or atom or what have you - check out their kitchen sink demo to see what it could do.

So while I was at it, I updated ancient Perl to reasonably fresh PHP (no apologies). The UI is idiosyncratic and weird but I kind of love it. The middle portion (with all the directory and file links and every button but 'save') is usually hidden, but clicking on the current folder name brings it up. You can save the current file under a new name, get a list of Recently edit files, make a directory... hitting delete brings up a bunch of file delete links... hidden files are shown but in a smaller font... it automatically makes a backup every time I save or delete through it... also it's file extension aware.

So it's too weird and oddball for me to properly open source I think, but let me know if any part of this would be useful or interesting to you...

No comments:

Post a Comment