Skip to content

Commit

Permalink
Allow variable mention trigger in default template.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Humphreys committed Mar 6, 2020
1 parent 6345b26 commit fdb1d43
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Tribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ class Tribute {
}

static defaultSelectTemplate(item) {
if (typeof item === "undefined") return "@" + this.current.mentionText;
if (typeof item === "undefined")
return `${this.current.collection.trigger}${this.current.mentionText}`;
if (this.range.isContentEditable(this.current.element)) {
return (
'<span class="tribute-mention">' +
Expand Down

0 comments on commit fdb1d43

Please sign in to comment.