HTML to text

Install-Package NUglify

public static IHtmlContent HtmlToText<T>(this IHtmlHelper<T> html, string htmlText)
    => new StringHtmlContent(Uglify.HtmlToText($"<div>{htmlText}</div>").ToString());

Comments

Popular posts from this blog

Left Join in Entity Framework

C# Record Serialization

Mustache with JavaScript in Browser