Add plugin system with sample plugin and settings UI
Introduces a plugin architecture, including a PluginManager, plugin loading in main and renderer processes, and a sample plugin demonstrating menu, IPC, and context menu contributions. Adds a Plugins tab to the settings UI for managing plugins (enable/disable, reload), and updates preload.js to load renderer preloads from plugins. Documentation for plugin development is included in README-PLUGINS.md.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
// Renderer preload for sample plugin
|
||||
// You can expose new APIs to the page
|
||||
const { contextBridge, ipcRenderer } = require('electron');
|
||||
|
||||
contextBridge.exposeInMainWorld('sampleHello', {
|
||||
ping: () => ipcRenderer.invoke('sample-hello:ping'),
|
||||
onHello: (handler) => ipcRenderer.on('sample-hello', (_e, payload) => handler(payload))
|
||||
});
|
||||
Reference in New Issue
Block a user