_onSearch (forceSearch) {
    this._clearDelay()

    const value = this.dom.search.value
    const text = value.length > 0 ? value : undefined
    if (text !== this.lastText || forceSearch) {
      // only search again when changed
      this.lastText = text
      this.results = this.editor.search(text)
      const MAX_SEARCH_RESULTS = this.results[0]
        ? this.results[0].node.MAX_SEARCH_RESULTS
        : Infinity

      // try to maintain the current active result if this is still part of the new search results
      let activeResultIndex = 0
      if (this.activeResult) {
        for (let i = 0; i < this.results.length; i++) {
          if (this.results[i].node === this.activeResult.node) {
            activeResultIndex = i
            break
          }
        }
      }

      this._setActiveResult(activeResultIndex, false)

      // display search results
      if (text !== undefined) {
        const resultCount = this.results.length
        if (resultCount === 0) {
          this.dom.results.textContent = 'no\u00A0results'
        } else if (resultCount === 1) {
          this.dom.results.textContent = '1\u00A0result'
        } else if (resultCount > MAX_SEARCH_RESULTS) {
          this.dom.results.textContent = MAX_SEARCH_RESULTS + '+\u00A0results'
        } else {
          this.dom.results.textContent = resultCount + '\u00A0results'
        }
      } else {
        this.dom.results.textContent = ''
      }
    }
  }
Handle onSearch event
@param {boolean} [forceSearch]  If true, search will be executed again even
                                when the search text is not changed.
                                Default is false.
@private