Domain Specific Languages currently have its hype. Important feature of serious new language implementation is a tool support – editor with code completion. There is already significant set of tools that allow to build a complete language solution. Most of them were presented recently on Language Workbench Competition 2011.
I was searching something similar implemented in Javascript and I found Concrete Editor. It represents structured approach to language editing. New entities are created with a set of attribute placeholders. It perfectly fits to languages describing elements and relations between them. For expression language it is far much easier to edit in a free text manner. To give an example I've implemented simple free text editor for Concrete metamodel.