code: function (editor) {
          var activeEditor = this.activeEditor;
  
          if (this.activeEditor != editor) {
            if (activeEditor) {
              activeEditor.fire('deactivate', { relatedTarget: editor });
            }
  
            editor.fire('activate', { relatedTarget: activeEditor });
          }
  
          this.activeEditor = editor;
        }
docs: Sets the active editor instance and fires the deactivate/activate events.
  
  @method setActive
  @param {tinymce.Editor} editor Editor instance to set as the active instance.