Changelog
v3.0.2
linkify-string
and linkify-html
type declarationsChangelog
v3.0.1
Changelog
v3.0.0
linkify-react
,linkify-jquery
and linkify-element
respectively:class="linkified"
from all discovered links. Opt back in by setting the className
option:
linkifyStr(str, { className: "linkified" });
target="_blank"
attribute for discovered URLs. Opt back in by setting the target
option:
linkifyHtml(str, {
target: (href, type) => type === "url" && "_blank",
});
<span>
tag wrapper in favour of tag-less React.Fragment
for React >=16. To opt back-in, set tagName='span'
:
<Linkify tagName="span">{content}</Linkify>
linkify-string
and linkify-html
instead of linkifyjs/string
and linkifyjs/html
. The embedded packages will be removed in v4.0linkify-plugin-[PLUGIN]
instead of linkifyjs/plugin/[PLUGIN]
. The embedded packages will be removed in v4.0Full Internationalized Domain (IDN) and Emoji domain support 🇺🇳🌍✈️🎉💃! Detect URLs, #hashtags and @mentions in any language
~10x faster startup; ~4x faster combined startup + first run
Custom protocols with linkify.registerCustomProtocol('protocol')
Modernized codebase and build system
Add new rel
option at top level as an alternate way of including it in attributes
New and improved plugin API
TypeScript definitions included in published packages
linkify.find()
output includes start and end indexes for where in the string a link was found
Plugins no longer need to be called on linkify after import
// Before
import * as linkify from "linkifyjs";
import hashtag from "linkifyjs/plugins/hashtag";
hashtag(linkify);
// After
import * as linkify from "linkifyjs";
import "linkifyjs/plugins/hashtag";