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

Support Multiple Trigger Chars #7

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ryanramage
Copy link

triggerChar can now be set as just a char, or an array of chars. The trigger char is passed as the last parameter to the onDataRequest callback.
All type and templates now include the type and trigger char.
this commit fixes #5

ryanramage and others added 5 commits December 16, 2011 11:08
triggerChar can now be set as just a char, or an array of chars. The trigger char is passed as the last parameter to the onDataRequest callback.
All type and templates now include the type and trigger char.
@auchenberg
Copy link
Contributor

Thanks for adding this. It could become quite powerful for tagging etc.

The only thing is the usage of jQuery.data which I would prefer if we could avoid. Guess we need to change the signature of addMention to accept the triggerChar as a param?

@cmer
Copy link

cmer commented Feb 25, 2012

+1 for this.

@j-hernandez
Copy link

+1

1 similar comment
@mneuhaus
Copy link

+1

@mneuhaus
Copy link

I think there is no real nice way to circumvent the usage of data.
Is this the only thing that prevents this PR?

@SteelBRS
Copy link

Ehrm, I can't get triggerChar to work with an array - tried:
triggerChar:['@','#']

Oh, this code isn't in the master branch yet - any way to access ryanramage's changes?

@ryanramage
Copy link
Author

@TorbenVesterager here is my fork: https://github.com/ryanramage/jquery-mentions-input . It is now a little out of date. You can try and merge all the this master branch in if you would like.

saiwong pushed a commit to sporttu/jquery-mentions-input that referenced this pull request Jan 4, 2014
@erswelljustin
Copy link

Hi everyone, just stumbled upon this, and its is great however I am having some issues, I need to make different .getJSON() calls if a user types in an @ or an # can some create a GIST to show how to do this I am sure I am not the only one struggling

@sawyu
Copy link

sawyu commented Aug 20, 2014

How to add triggerChar from button click in mentionInput? triggerChar is not from type ahead. It comes from button click.

@kockok
Copy link

kockok commented Jun 7, 2015

Is multiple triggers working now? I mean "@" for mentions and "#" for hashtags, both from different JSON sources.

@leizard
Copy link

leizard commented Sep 10, 2015

@kockok I have the exact same question

@WellMafra
Copy link

@kockok I have the exact same question²

Copy link

@emashiq emashiq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really amazing work. Love it.

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

Successfully merging this pull request may close these issues.

Support Multiple Trigger Chars