I can't find any mention in the documentation on how to obtain a reference to a CodeMirror instance after the fact (i,e, created in an in closure). I'm writing some bookmarklets at the moment and can't find any way to hook into a page's codemirror instance. Is there a CodeMirror.getInstances() or CodeMirror.getFromTextArea() that can be used to obtain a reference for further work?
The constructor will set a CodeMirror property on the wrapping DOM node it creates which refers to the editor instance.
ah, useful! This might need a small section in the user manual near the fromTextArea etc. functions.
really important to write a small example of how to get instance of Codemirror from textArea
Most helpful comment
really important to write a small example of how to get instance of Codemirror from textArea