Plugins

Components can have plugins. Plugins are a collection of features that extend a components functionallity. They can be activated by the components options and can have their own configuration. Plugins can have a own html template that is inserted into the component at specified places.

Activate a plugin

To use a plugin configure it in the component options. It must have an id and set to active: true. The folowing example shows the plugins content.


window['sample_plugin_1_options'] = {
    plugins: new Map()
};
window['sample_plugin_1_options'].plugins.set('SamplePlugin', {
    id: 'SamplePlugin',
    active: true
});
        

Setting plugin options

Options for a plugin are setted in the same way as options for components.
You can store the options in an object placed in the browsers window variable.


window['sample_plugin_2_options'] = {
    plugins: new Map()
};
window['sample_plugin_2_options'].plugins.set('SamplePlugin', {
    id: 'SamplePlugin',
    active: true
});
// Setting plugins options
window['SamplePlugin_sample_plugin_2_options'] = {
    modaloption: true
};