Allow disabling linkClass
See original GitHub issueHey,
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:
- Created 7 years ago
- Reactions:1
- Comments:6
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Fixed in v2.1.6. Specify
className: null
in the options. 3.0 will remove the defaultlinkified
class.+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 😃