_setup (config, options = {}) {
      this.config = config
      const editorState = this.editorState

      const surfaceManager = new SurfaceManager(editorState)
      const markersManager = new MarkersManager(editorState)
      const keyboardManager = new KeyboardManager(config.getKeyboardShortcuts(options), (commandName, params) => {
        return this.executeCommand(commandName, params)
      }, this)
      const commandManager = new CommandManager(this,
        // update commands when document or selection have changed
        // TODO: is this really sufficient?
        ['document', 'selection'],
        config.getCommands(options)
      )
      const findAndReplaceManager = new FindAndReplaceManager(this)
      this.surfaceManager = surfaceManager
      this.markersManager = markersManager
      this.keyboardManager = keyboardManager
      this.commandManager = commandManager
      this.findAndReplaceManager = findAndReplaceManager

      // has to be set before initialisation
      this.context = null

      // ATTENTION: we need a root DOM element e.g. for finding surfaces
      // An editor component should call something like
      // ```
      // editorSession.setRootComponent(editor.getContent())
      // ```
      // during didMount()
      this._rootComponent = null
    }
@param {Configurator} config
@param {object} options
@param {boolean} options.inherit true if commands and keyboard shortcuts should be inherited from parent configurations.