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

Make links customizable #3

Closed
algorys opened this issue Jul 1, 2019 · 3 comments
Closed

Make links customizable #3

algorys opened this issue Jul 1, 2019 · 3 comments

Comments

@algorys
Copy link

algorys commented Jul 1, 2019

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,
});
@jcubic
Copy link
Owner

jcubic commented Jul 1, 2019

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?

jcubic added a commit that referenced this issue Jul 4, 2019
@jcubic
Copy link
Owner

jcubic commented Jul 4, 2019

link option was added will publish to npm soon.

@algorys
Copy link
Author

algorys commented Jul 4, 2019

@jcubic thanks 👍

@jcubic jcubic closed this as completed Jul 8, 2019
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

2 participants