New createHistory API in Forge bridge version 1.5.0

We’ve added a new view.createHistory API in Forge bridge version 1.5.0.

The createHistory API enables your custom UI app to manipulate the current page URL for routing within full page apps.

Run npm install @forge/bridge@latest in your resource directory to install the latest version of Forge bridge.


awesome :muscle: :tada:

1 Like

Nice addition !

1 Like

Hi @kchan,

I tested it with Custom UI and the react-router stuff, works awesome :slight_smile:

The only thing I really would like to do is support “Open link in new Tab”. Meaning: The a-href should contain the full URL with
BUT: Even though I manage to build the jira:projectPage base URI the opened URL is the CDN baseURL e.g.

So the code snippet is not quite right, because it states this:

      href={to}  /// <---- DOES NOT WORK
      onClick={(event) => {

Question: Is there any way to get the site baseURL in a forge resolver?
I mean https://[SITE]

Because when using full baseURL in a-href a normal click would still route with onclick but a middle-mouse click would (for most users) open a new tab with the full URL correctly.

Is there a way to achieve this? :slight_smile:



Hi @clouless,

Glad to hear the createHistory API works well!

Regarding your request to open full URLs, this is possible via the router.navigate and functions from @forge/bridge. In particular, will open a full URL in a new tab. See the documentation at

In the router.navigate and APIs, a relative URL will be prefixed with the site URL, e.g. router.navigate('/browse') will navigate to https://[SITE]

1 Like

Thanks for your fast answer :slight_smile: I know this works that way, but it is still a JS-only triggered thing. This does not solve the “Open link in new tab” problem, that would only work with the a-href and native browser support without JS.

Maybe you can elaborate if this can work in the future.

What would be great would be some method like “router.getBaseUrl()” which returns https://[SITE] :slight_smile:

UPDATE: :white_check_mark: Since the Custom UI is inside an iframe we can do it via document.location.ancestorOrigins

      href={`${document.location.ancestorOrigins[0]}${to}`}  /// <---- DOES WORK and prepends
      onClick={(event) => {

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.