Plugin configuration object
Configuration for initializing a plugin from the parent side
Initial data to pass to the plugin
Plugin settings and configuration
Map of hook names to callback functions that the parent provides to the plugin
Inline-specific initialization options
Options for inline plugin initialization
URL of the plugin to load
Container element where the plugin iframe will be appended
OptionalbeforeInit?: (context: { container: HTMLElement; iframe: HTMLIFrameElement }) => voidOptional callback invoked before initializing the plugin iframe
Optionaltimeout?: numberOptional timeout in milliseconds for plugin initialization
Promise resolving to inline plugin interface with methods and destroy function
// Multiple inline plugins example
const noteIds = ['1', '2', '3'];
for (const noteId of noteIds) {
const container = document.getElementById(`note-${noteId}`);
const plugin = await initInlinePlugin(
{
data: { noteId },
hooks: {
onSave: (data) => saveNote(data)
}
},
{
src: 'https://example.com/note-plugin.html',
container
}
);
}
Initializes an inline plugin embedded within a specified DOM container.
Use this function when you want to embed a plugin directly into your page layout (e.g., as a widget, card, or component). The plugin iframe will be sized to fit the container and remain visible at all times.
When to Use Inline Plugins
Basic Usage
Differences from Fullscreen Plugins