Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get trigger char when using multiple triggers #78

Open
Patchesoft opened this issue Oct 5, 2017 · 1 comment
Open

Get trigger char when using multiple triggers #78

Patchesoft opened this issue Oct 5, 2017 · 1 comment

Comments

@Patchesoft
Copy link

I am doing something like this:

$(".editor-textarea").mentionsInput({trigger: "#@", source: global_base_url + 'home/get_user_friends'});

I want to be able to distinguish when the users # or @ so I can lookup the correct database table of terms and return them as such. The only data currently being sent is term

Anyone got a solution for this?

@Patchesoft
Copy link
Author

I managed to solve this issue by keeping the trigger character next to the value in the hidden input. So instead of username it would appear @username.

I changed the following line (160):

this.searchTerm = match[1];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant