marijnh/CodeMirror — pull request #948 by kaerus (2012-11-11 12:17:29+00:00)
Title: maintain reference to instances

Simple patch to maintain references to the running instances. Instance id is set by using options.id. CodeMirror.getInstance(id) returns instance by id or an array of all running instances.
If using CodeMirror.fromTextArea the instance id defaults to the textarea.id (unless it's set via options).