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

Transform more text into url that i want #407

Open
Mathieu122 opened this issue Nov 2, 2022 · 1 comment
Open

Transform more text into url that i want #407

Mathieu122 opened this issue Nov 2, 2022 · 1 comment
Labels
plugin Anything related to the plugin API

Comments

@Mathieu122
Copy link

I have this in my text CR.INC.2022 and linkify-html transform CR.INC into a url but i don't want this considered like that.
It's possible to linkify to not transform CR.INC.2022 into a link ?

that's how i transform my text

linkifyHtml(text, {
            target: disableHref ? null : 'blank',
            formatHref: href => disableHref ? href = '#' : href,
            events: { click: e => e.preventDefault() }
         })
@nfrasser
Copy link
Collaborator

@Mathieu122 this is somewhat an advanced use case, but you could do this with the registerPlugin function. Use the linked examples as a reference for how to define your own plugins.

@nfrasser nfrasser added the plugin Anything related to the plugin API label Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin Anything related to the plugin API
Projects
None yet
Development

No branches or pull requests

2 participants