getSelection (options) {
    // HACK: ignore this if not Browser (e.g. when running the test suite in node)
    if (!platform.inBrowser) return
    const range = this.mapDOMSelection(options)
    const doc = this.editor.getDocument()
    // TODO: consolidate
    return doc._createSelectionFromRange(range)
  }
Create a model selection by mapping the current DOM selection
    to model coordinates.

    @param {object} options
      - `direction`: `left` or `right`; a hint for disambiguations, used by Surface during cursor navigation.
    @returns {model/Selection}