Markdown Tag Helper


This tag helper allows you to write Markdown in your Razor pages and converts that markdown to HTML.

Simple Markdown element

This is some simple markdown.

Code:

<markdown>This is some _simple_ **markdown**.</markdown>

Markdown element binded with content attribute

this is some markdown

Code:

<markdown content="@ViewData["MarkdownContent"]"></markdown>

More Complex Markdown element

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

Code:

<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>

Simple p element with markdown

This is some simple markdown in a p element.

Code:

<p markdown>This is some _simple_ **markdown** in a _p_ element.</p>