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());

Leave a Reply

Your email address will not be published.