Class: QuillMentions

QuillMentions

new QuillMentions(quill, options)

Parameters:
Name Type Argument Description
quill Object An instance of `Quill`.
options Object <optional>
User configuration passed to the mentions module. It's mixed in with defaults.
Properties:
Name Type Description
quill Object Instance of quill editor.
options Object Default configuration mixed in with user configuration.
container Object DOM node that contains the mention choices.
currentChoices Array.<Object> | null -
currentMention Object | null
Source:

Methods

<private> _findMentionNode(range) → {Node|null}

Return the DOM node that encloses the line on which current mention is being typed.
Parameters:
Name Type Description
range Range
Source:
Returns:
Type
Node | null

<private> _findOffsetLines(range) → {Node[]}

Return an array of dom nodes corresponding to all lines at or before the line corresponding to the current range.
Parameters:
Name Type Description
range Range
Source:
Returns:
Type
Node[]

<private> _getChoicesHTML()

Maps the current array of possible choices to one long string of HTML.
Source:

<private> _renderChoice()

Replaces the {{choice}} and {{data}} fields in a template.
Source:

addFormat()

Source:

addListeners()

Source:

addMention()

Source:

addMentionHandler()

Source:

ajaxSearch(qry, callback)

Parameters:
Name Type Description
qry string
callback searchCallback Callback that handles possible matches
Source:

findMention() → {Match}

Source:
Returns:
Type
Match

<private> hasChoices()

Returns whether or not there are any choices to display.
Source:

hasSelection()

Source:

hide()

Source:

isMentioning()

Source:

keyboardHandler()

Source:

<private> render()

Adds markup to template and puts it inside the container.
Source:

renderCurrentChoices()

TODO - this should simply pass data to the view and let it sort shit out.
Source:
Dispatches search for possible matches to a query.
Parameters:
Name Type Description
qry string
callback searchCallback Callback that handles the possible matches
Source:

selectionChangeHandler()

Source:

show(reference)

Parameters:
Name Type Description
reference Object
Source:

staticSearch(qry, callback)

Parameters:
Name Type Description
qry string
callback searchCallback Callback that handles possible matches
Source:

textChangeHandler()

Source: