code: function (editor) {
          var self = this, editors = self.editors;
  
          // Add named and index editor instance
          editors[editor.id] = editor;
          editors.push(editor);
  
          toggleGlobalEvents(editors, true);
  
          // Doesn't call setActive method since we don't want
          // to fire a bunch of activate/deactivate calls while initializing
          self.activeEditor = editor;
  
          self.fire('AddEditor', { editor: editor });
  
          if (!beforeUnloadDelegate) {
            beforeUnloadDelegate = function () {
              self.fire('BeforeUnload');
            };
  
            DOM.bind(window, 'beforeunload', beforeUnloadDelegate);
          }
  
          return editor;
        }
docs: Adds an editor instance to the editor collection. This will also set it as the active editor.
  
  @method add
  @param {tinymce.Editor} editor Editor instance to add to the collection.
  @return {tinymce.Editor} The same instance that got passed in.