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
Fullscreen-specific initialization options
Options for fullscreen plugin initialization
Unique identifier for the plugin container
URL of the plugin to load
OptionalparentElem?: HTMLElementParent element where the plugin container will be appended (defaults to document.body)
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 fullscreen plugin interface with methods, animations, and splash screen functions
// Example: Document editor with animations
const editor = await initFullscreenPlugin(
{
data: { docId: '123' },
hooks: {
onSave: (doc) => saveDocument(doc)
}
},
{
id: 'editor-modal',
src: 'https://editor.example.com/plugin.html'
}
);
// Show from bottom with slide animation
editor.show({ y: '100vh', time: 400 });
// Later...
await editor.hide();
await editor.destroy();
Initializes a fullscreen plugin with custom animations and optional splash screen.
Use this function when you want to display a plugin as a modal dialog that covers the entire viewport. The plugin supports smooth animations and optional splash screens.
When to Use Fullscreen Plugins
Basic Usage
Animation Options
The
show()method supports custom animation parameters:Splash Screen
You can show a loading/splash screen while the plugin loads:
Enable splash screen via settings: