UtilHtmlLinkify(FileInfo, LinkifyInterfaceType, LinkifyPlugins, LinkifyFormatOptions, Encoding) Method

Highlights links within strings that contain HTML markup, or replace links in plain-text strings with anchor (<a>) tags.

The behavior depends on the interfaceType parameter.

This function internally uses linkify JavaScript library (https://linkify.js.org/).

Definition

Namespace: DevCase.Core.DataProcessing.Html
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static string Linkify(
	FileInfo file,
	LinkifyInterfaceType interfaceType,
	LinkifyPlugins plugins = LinkifyPlugins.None,
	LinkifyFormatOptions formatOptions = null,
	Encoding encoding = null
)

Parameters

file  FileInfo
The source html or plain-text document file.
interfaceType  LinkifyInterfaceType
A interface type that defines how to parse the file content specified in file parameter.

If this value is Html, this function will highlight links within strings that contain HTML markup.

If this value is Html, this function will replace links in plain-text strings with anchor (<a>) tags.

plugins  LinkifyPlugins  (Optional)
Optional LinkifyPlugins flags that adds additional linkify capabilities.

By default this function only linkifies domain urls and email addresses.

Default value: None

formatOptions  LinkifyFormatOptions  (Optional)
Optional LinkifyFormatOptions object that adds additional formatting capabilities to links.
encoding  Encoding  (Optional)
Optionally specifies the text encoding used to read the markdown document.

Default value: Default

Return Value

String
The resulting linkified text.

Remarks

Note: To use this functionality you need to install this nuget package:

Microsoft.ClearScript.V8

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

See Also