Hi Mark, we're also using codemirror, mentioned by Vincent, for the XML editor built into the Citation Style Language visual editor: http://editor.citationstyles.org/codeEditor/ I didn't build this, so can't speak to the difficulty of implementation, but it's certainly been stable and easy to maintain. Best, Sebastian