Learn how to integrate the Mindlogic Plugin into your website or application.
Before you begin integrating the Mindlogic Plugin, you'll need:
Add the following script tags to your HTML to include and initialize the Mindlogic Plugin:
<script type="module" src="https://plugin.mindlogic.ai/latest/plugin.js"></script>
<script type="module">
window.MLCPlugin.init(<windowId>);
</script>
Replace <windowId> with your actual Mindlogic window ID. This will add the plugin to your website with default settings.
The simplest way to initialize the plugin with default settings:
Basic initialization
window.MLCPlugin.init("window_id")
For more advanced configuration options, you can pass a configuration object as the second parameter:
Advanced configuration
window.MLCPlugin.init("window_id", {
// Changes the id of the root this plugin is rendered into
divId: 'container-id',
// Determine whether the plugin should be open by default
initialOpen: true,
// Adjusts the position of the plugin and the floating button
position: {
right: 10, // Distance from the right edge of the screen in pixels
bottom: 20, // Distance from the bottom edge of the screen in pixels
},
// Other configuration options...
})
See the MLCPluginOptions Interface section for a complete list of configuration options.