CodeMirror is JavaScript component that provides a code editor in the browser. CodeMirror-XQuery is an extension of CodeMirror to provide usefull features for XQuery editor like :
You can play with the XQuery online demo and see the XQuery Features.