Knagis/CommonMark.NET

Provide tag helper for aspnet core

Closed this issue · 3 comments

From aspnet/Mvc#4473 (comment)

I'm sure at some point in the future someone will create a tag helper for it and put it on NuGet

Would be nice if someone does that once in for example a supplementary CommonMark.NET.TagHelpers package (dependency on core CommonMark.NET package) and provide a sample how to configure, reconfigure and use it in a aspnet-core Razor views. 🚀

Would this be what you are looking for?

https://www.nuget.org/packages/TagHelperSamples.Markdown

Exactly! Sample from https://github.com/dpaquette/TagHelperSamples/blob/7d4d874/TagHelperSamples/src/TagHelperSamples.Web/Views/Samples/MarkdownTagHelper.cshtml:

<markdown>
A First Level Header
====================

A Second Level Header
---------------------

Now is the time for all good men to come to
the aid of their country. This is just a
regular paragraph.

The quick brown fox jumped over the lazy
dog's back.
### Header 3
> This is a blockquote.
>
> This is the second paragraph in the blockquote.
>
> ## This is an H2 in a blockquote
</markdown>

Thanks @Knagis!