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

Remove the default class .linkified #216

Closed
hongbo-miao opened this issue Nov 14, 2017 · 6 comments
Closed

Remove the default class .linkified #216

hongbo-miao opened this issue Nov 14, 2017 · 6 comments
Milestone

Comments

@hongbo-miao
Copy link

hongbo-miao commented Nov 14, 2017

Thanks for the great package!

It would be great to have option to remove the default class .linkified.

Right now neither of these two works.

linkifyHtml(html, {
  className: ''
});
linkifyHtml(html, {
  className: null
});
@groe
Copy link

groe commented Jan 17, 2018

👍

Workaround:

linkify.options.defaults.className = "";

@hongbo-miao
Copy link
Author

Thank you @groe, I will try tonight!

@hongbo-miao
Copy link
Author

hongbo-miao commented Jan 20, 2018

Hi @groe how did you import? I am using linkifyjs 2.1.5

1.

import linkifyHtml from 'linkifyjs/html';
linkifyHtml.options.defaults.className = '';

gives me error

TypeError: Cannot read property 'defaults' of undefined

2.

import linkify from 'linkifyjs';
linkify.options.defaults.className = '';

gives me error

TypeError: Cannot read property 'options' of undefined

@groe
Copy link

groe commented Jan 22, 2018

@hongbo-miao I don't import it, I just include it in the page. Basically it's a <script src="linkify.min.js"></script>

@nfrasser
Copy link
Collaborator

nfrasser commented Mar 3, 2018

This will be fixed in Linkify 3.0

@nfrasser nfrasser added this to the 3.0 milestone Mar 3, 2018
@nfrasser nfrasser mentioned this issue Mar 8, 2021
@nfrasser
Copy link
Collaborator

nfrasser commented Sep 16, 2021

Fixed in v3 (took longer than I thought!)

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

No branches or pull requests

3 participants