BAM Weblog

Climacs

Brian McKenna — 2011-07-31

This week I tried creating an application with ClojureScript and Google Closure. One idea I’ve had for a while is an extensible HTML5 text editor.

I’m an avid Emacs user because Emacs is extremely extensible; I’m able to write some Lisp to make Emacs work exactly as I like. I wanted the same concept to be core to my toy editor, you write some JavaScript and extend the editor at runtime.

I didn’t get very far because I was constantly running into problems with DOM Ranges. What I did achieve was syntax highlighting (via parse-js.js in UglifyJS) and JavaScript evaluation:

I’ve put a demo up and the code is on Bitbucket. Only tested in Chrome. Editing is very limited and will only work on a single line. Evaluate your JavaScript with CTRL/CMD+J.

Please enable JavaScript to view the comments powered by Disqus.