jcubic/tagger

Make links customizable

algorys opened this issue · 3 comments

When badge for tags are added, links point to /tag/<tagname>, but we can't choose link prefix like:

my/route/tag/tagname or something like that. Or let user deactivate the link by href="# or use a span instead ?

tagger(input, {
    allow_duplicates: false,
    allow_spaces: true,
   use_links: false,
});

I think it will be better to add this API:

tagger(input, {
    allow_duplicates: false,
    allow_spaces: true,
    link: function(name) {
      return '#';
    }
});

and if function return false it will create span. You will be able to change and disable with single endpoint. What you think?

link option was added will publish to npm soon.

@jcubic thanks 👍