Converse converse.js

Namespace: plugins

converse.plugins

Exposes methods for adding and removing plugins. You'll need to write a plugin if you want to have access to the private API methods defined further down below.

For more information on plugins, read the documentation on writing a plugin.

Source:

Methods

(static) add(name, plugin)

Registers a new plugin.

Parameters:
Name Type Description
name string

The name of the plugin

plugin object

The plugin object

Source:
Example
const plugin = {
     initialize: function () {
         // Gets called as soon as the plugin has been loaded.

         // Inside this method, you have access to the private
         // API via `_covnerse.api`.

         // The private _converse object contains the core logic
         // and data-structures of Converse.
     }
 }
 converse.plugins.add('myplugin', plugin);

(static) add(name, plugin)

Registers a new plugin.

Parameters:
Name Type Description
name string

The name of the plugin

plugin object

The plugin object

Source:
Example
const plugin = {
     initialize: function () {
         // Gets called as soon as the plugin has been loaded.

         // Inside this method, you have access to the private
         // API via `_covnerse.api`.

         // The private _converse object contains the core logic
         // and data-structures of Converse.
     }
 }
 converse.plugins.add('myplugin', plugin);

converse.plugins

Exposes methods for adding and removing plugins. You'll need to write a plugin if you want to have access to the private API methods defined further down below.

For more information on plugins, read the documentation on writing a plugin.

Source:

Methods

(static) add(name, plugin)

Registers a new plugin.

Parameters:
Name Type Description
name string

The name of the plugin

plugin object

The plugin object

Source:
Example
const plugin = {
     initialize: function () {
         // Gets called as soon as the plugin has been loaded.

         // Inside this method, you have access to the private
         // API via `_covnerse.api`.

         // The private _converse object contains the core logic
         // and data-structures of Converse.
     }
 }
 converse.plugins.add('myplugin', plugin);

(static) add(name, plugin)

Registers a new plugin.

Parameters:
Name Type Description
name string

The name of the plugin

plugin object

The plugin object

Source:
Example
const plugin = {
     initialize: function () {
         // Gets called as soon as the plugin has been loaded.

         // Inside this method, you have access to the private
         // API via `_covnerse.api`.

         // The private _converse object contains the core logic
         // and data-structures of Converse.
     }
 }
 converse.plugins.add('myplugin', plugin);