question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow disabling linkClass

See original GitHub issue

Hey,

Given the falsy, as opposed to an undefined, check of linkClass: opts.linkClass || 'linkified' (https://github.com/SoapBox/linkifyjs/blob/master/src/linkify/utils/options.js#L25) it’s not possible to disable the class entirely. One would have to resort to using " " to trick the coercive ||. Please consider using === undefined to allow removing the class without unintuitive hacks.

Thanks!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

1reaction
nfrassercommented, Mar 3, 2018

Fixed in v2.1.6. Specify className: null in the options. 3.0 will remove the default linkified class.

0reactions
jacobmummcommented, Aug 31, 2016

+1 Have no need to add a class. Switching from angular’s linkyFilter to this broke our unit tests with the addition of the linkified class. I guess I’ll just expect it to be there for now and remove later. Great looking product, though. Thanks 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Disable Links | CSS-Tricks
First, we need to style our link so that it looks disabled. .isDisabled { color: currentColor; cursor: not-allowed; opacity: 0.5; ...
Read more >
Disable a link in Bootstrap - html - Stack Overflow
It seems that Bootstrap doesn't support disabled links. ... .disabled { color: currentColor; cursor: not-allowed; opacity: 0.5; ...
Read more >
Allow defining disabled link class · Issue #42 · wwwaiser/react-js ...
My classes are managed via links, not list item elements, so I would appreciate if additional param disabledlinkClass was available.
Read more >
Disable a menu Item - Support - Themeco Forum
I tried to disable a menu item in the menu so only the sub items are clickable I chose the setting and saved...
Read more >
The External Resource Link element - HTML - MDN Web Docs
If disabled is specified in the HTML when it is loaded, the stylesheet will not be loaded during page load. Instead, the stylesheet...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found