I’m developing a plugin for Mattermsot which shows an iframe and the contents I need inside the iframe, Currently, I have managed to register this as a product and now it shows in the product switcher,

When I click the Iframe button it opens the Iframe in the same window as the channels, What I need is open it from a new tab similar to boards and playbooks in the Mattermost desktop app, in the web browser it can be as it is now.
Thank you for your support.
Here is my plugin code
import React from 'react';
let iframeURL = "https://codepen.io/rdesigncode/details/zYPzaqb"
const customRoute = '/myplugin';
class myplugin{
initialize(registry, store) {
const IframeComponent = () => {
return (
<iframe src={iframeURL} height="100%" width="100%" title="myplugin"></iframe>
);
};
registry.registerProduct(
customRoute,
'kanban',
"IFrame",
customRoute,
IframeComponent,
'headerCentreComponent',
'headerRightComponent',
true,
true,
true
);
}
}
window.registerPlugin('myplugin', new myplugin());
When you click the
Iframebutton, it opens the Iframe in the same window as the channels. You would like to open it from a new tab similar toboards and playbooksin theMattermost desktop app. Currently this isn't not supported byMattermost desktop app.one alternative could be to open the contents of your plugin in a new window instead of a new tab, usingJavaScript( open a new window with the desired URL when the user clicks on theIframebutton ) . See belowcall this function when the user clicks on the
Iframebutton to open the contents of yourpluginin a new window.