Your comments

Processing.js is a lot more mature than when this request was first made.  It should now be possible to preview by embedding into straightforward template, less complicated than even Markdown.

It's silly that Codify got so much attention for Lua scripting on-device, when Textastic  +Processing.js would be more powerful, more capable, and allow saving code off-device.