Well I found this article about bounty hunting at the Marklogic XQuery community and decided to try my hand at a CodeMirror and a SyntaxHighlighter plugin. The source is attached to the demo pages, I hope you like my solutions.
Visit the demo pages by following the links. If you have some feedback, suggestions or questions please feel free to send me a message.