diff --git a/ui/v2.5/src/docs/en/Manual/UIPluginApi.md b/ui/v2.5/src/docs/en/Manual/UIPluginApi.md index 8b6fc39c27f..931cb39ec43 100644 --- a/ui/v2.5/src/docs/en/Manual/UIPluginApi.md +++ b/ui/v2.5/src/docs/en/Manual/UIPluginApi.md @@ -12,6 +12,10 @@ An example using various aspects of `PluginApi` may be found in the source code An instance of the React library. +### `ReactDOM` + +An instance of the ReactDOM library. + ### `GQL` This namespace contains the generated graphql client interface. This is a low-level interface. In many cases, `StashService` should be used instead. @@ -25,6 +29,8 @@ This namespace contains the generated graphql client interface. This is a low-le - `Intl` - `FontAwesomeRegular` - `FontAwesomeSolid` +- `Mousetrap` +- `MousetrapPause` ### `register` diff --git a/ui/v2.5/src/pluginApi.tsx b/ui/v2.5/src/pluginApi.tsx index df917a1ad6c..7c63d68377e 100644 --- a/ui/v2.5/src/pluginApi.tsx +++ b/ui/v2.5/src/pluginApi.tsx @@ -1,5 +1,8 @@ import React from "react"; +import ReactDOM from "react-dom"; import * as ReactRouterDOM from "react-router-dom"; +import Mousetrap from "mousetrap"; +import MousetrapPause from "mousetrap-pause"; import NavUtils from "./utils/navigation"; import { HoverPopover } from "./components/Shared/HoverPopover"; import { TagLink } from "./components/Shared/TagLink"; @@ -97,6 +100,7 @@ export function RegisterComponent(component: string, fn: Function) { } export const PluginApi = { React, + ReactDOM, GQL, libraries: { ReactRouterDOM, @@ -105,6 +109,8 @@ export const PluginApi = { Intl, FontAwesomeRegular, FontAwesomeSolid, + Mousetrap, + MousetrapPause, }, register: { // register a route to be added to the main router