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

Already on GitHub? Sign in to your account

Add option to preprocessTags before creatingTag #150

Merged
merged 1 commit into from Mar 4, 2013

Conversation

Projects
None yet
2 participants
Contributor

kevinslin commented Feb 23, 2013

Write now, there's no way to change the value of a tag before it gets created.
For example, you could use this to capitalize every tag before creating it.

$("#tag-it").tagit("preprocessTag", function(val) {
  if (!val) { return ''; }
  return val[0].toUpperCase() + val.slice(1, val.length);
});
// foo -> Foo

@aehlke aehlke added a commit that referenced this pull request Mar 4, 2013

@aehlke aehlke Merge pull request #150 from kevinslin/master
Add option to preprocessTags before creatingTag
63f7c11

@aehlke aehlke merged commit 63f7c11 into aehlke:master Mar 4, 2013

Owner

aehlke commented Mar 4, 2013

Could you please add this to the docs? Thanks.

Owner

aehlke commented Mar 4, 2013

This is a great feature, BTW :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment