Skip to content
Snippets Groups Projects

Resolve "allow to have plugins without panel"

Merged Piotr Gawron requested to merge 306-allow-to-have-plugins-without-panel into development
8 files
+ 46
22
Compare changes
  • Side-by-side
  • Inline
Files
8
+ 7
5
@@ -11,6 +11,7 @@ Your plugin should utilize the `window.minerva.plugins.registerPlugin` method fo
pluginName: string;
pluginVersion: string;
pluginUrl: string;
withoutPanel: boolean | undefined;
}
```
@@ -21,6 +22,7 @@ window.minerva.plugins.registerPlugin({
pluginName: 'Your Plugin Name',
pluginVersion: '1.8.3',
pluginUrl: 'https://example.com/plugins/plugin.js',
withoutPanel: false,
});
```
@@ -28,17 +30,17 @@ window.minerva.plugins.registerPlugin({
The `window.minerva.plugins.registerPlugin` method returns object with `element` property which is a DOM element, allowing your plugin to append its HTML content to the DOM. Use this element to create and modify the HTML structure of your plugin.
```
```javascript
// Plugin registration
const { element } = window.minerva.plugins.registerPlugin({
pluginName: "Your Plugin Name",
pluginVersion: "1.0.0",
pluginUrl: "your-plugin-url",
pluginName: 'Your Plugin Name',
pluginVersion: '1.0.0',
pluginUrl: 'your-plugin-url',
});
// Modify plugin's HTML structure
const yourContent = document.createElement('div');
yourContent.textContent = "Your Plugin Content";
yourContent.textContent = 'Your Plugin Content';
element.appendChild(yourContent);
```
Loading