code: function forEachCodeMirror(f) {
      if (!document.body.getElementsByClassName) return;
      var byClass = document.body.getElementsByClassName("CodeMirror");
      for (var i = 0; i < byClass.length; i++) {
        var cm = byClass[i].CodeMirror;
        if (cm) f(cm);
      }
    }
docs: These must be handled carefully, because naively registering a handler for each editor will cause the editors to never be garbage collected.