Converse converse.js

Class: exports

exports()

converse-root is an optional custom element which can be used to declaratively insert the Converse UI into the DOM.

It can be inserted into the DOM before or after Converse has loaded or been initialized.

Constructor

new exports()

Source:

Methods

(async, static) hook(name, …context, …data) → {Promise.<any>}

Triggers a hook which can be intercepted by registered listeners via _converse.api.listen.on or _converse.api.listen.once. (see _converse.api.listen). A hook is a special kind of event which allows you to intercept a data structure in order to modify it, before passing it back.

Parameters:
Name Type Attributes Description
name string

The hook name

context any <repeatable>

The context to which the hook applies (could be for example, a _converse.ChatBox)).

data any <repeatable>

The data structure to be intercepted and modified by the hook listeners.

Source:
Returns:
  • A promise that resolves with the modified data structure.
Type
Promise.<any>

exports()

The RichText custom element allows you to parse transform text into rich DOM elements.

Constructor

new exports()

Source:
Example
<converse-rich-text text="*_hello_ world!*"></converse-rich-text>

Methods

(async, static) hook(name, …context, …data) → {Promise.<any>}

Triggers a hook which can be intercepted by registered listeners via _converse.api.listen.on or _converse.api.listen.once. (see _converse.api.listen). A hook is a special kind of event which allows you to intercept a data structure in order to modify it, before passing it back.

Parameters:
Name Type Attributes Description
name string

The hook name

context any <repeatable>

The context to which the hook applies (could be for example, a _converse.ChatBox)).

data any <repeatable>

The data structure to be intercepted and modified by the hook listeners.

Source:
Returns:
  • A promise that resolves with the modified data structure.
Type
Promise.<any>