filter_glossary/autolinker

Module for auto-linking glossary entries.

Source:
License:
  • http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Members

(static, constant) init

Source:

Initialize the module.

(inner, constant) The :Object

Source:

object containing the relevant selectors.

Type:
  • Object

Methods

(inner) fetchGlossaryEntry(entryId) → {Promise}

Source:

Fetch the linked glossary entry.

Parameters:
Name Type Description
entryId int

The id of the linked glossary entry.

Returns:

The glossary entry promise.

Type
Promise

(inner) generateTagListData(tags) → {Object}

Source:

Generates an object that contains the data required to render a tag list.

Parameters:
Name Type Description
tags array

The array containing the tags related to the linked glossary entry.

Returns:

The data required to render a tag list.

Type
Object

(inner) glossaryEntryViewed(entryId) → {Promise}

Source:

Notify that the linked glossary entry was viewed.

Parameters:
Name Type Description
entryId int

The id of the linked glossary entry.

Returns:

The promise object.

Type
Promise

(inner) registerEventListeners() → {void}

Source:

Register the event listeners for the glossary entry auto-linker.

Returns:
Type
void

(inner) showGlossaryEntry(entryId) → {Promise}

Source:

Show the linked glossary entry in a modal.

Parameters:
Name Type Description
entryId int

The id of the linked glossary entry.

Returns:

The modal promise.

Type
Promise