CodeMirror :

(source : http://codemirror.net/demo/resize.html ; http://codemirror.net/mode/)