LinkifyFormatOptionsFormatHref Property
Gets or sets a value to format the 'href' attribute.
Similar to
FormatLink property,
except the formatting will be used in the 'href' attribute of the new link, and not in the link value.
This is useful for hashtags or other
LinkifyPlugins plugins
where you don’t want the default to be a link to a named anchor (the default behaviour).
Accepts a function that takes the link type, the unformatted 'href' value,
and returns the new formated 'href' value.
Default value: null (no formatting) for all link types.
Namespace: DevCase.Core.DataProcessing.HtmlAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
No code example is currently available or this language may not be supported.
Property Value
FuncLinkifyLinkType,
String,
String
This is a code example.
No code example is currently available or this language may not be supported.
FormatHref =
Function(linkType As LinkifyLinkType, href As String) As String
Select Case linkType
Case LinkifyLinkType.Hashtag
Return "https://twitter.com/hashtag/" & href.Substring(1)
Case LinkifyLinkType.Mention
Return "https://github.com" & href
Case LinkifyLinkType.Ticket
Return "https://github.com/Hypercontext/linkifyjs/issues/" & href.Substring(1)
Case Else
Return href ' no formatting
End Select
End Function
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.