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());