For reference:
https://github.com/mozilla/pdf.js/issues/15571#issuecomment-1278141781
this.#uiManager.setEditingState(isEditing);
  }
  /**
   * Add some commands into the CommandManager (undo/redo stuff).
   * @param {Object} params
   */
  addCommands(params) {