How to get elements defined as TagHelper content?
E.g. element defined as:
<markdown>bla bla</markdown>
And helper defined as:
[HtmlTargetElement("markdown")]
public class MarkdownTagHelper : TagHelper
{
public override void Process(TagHelperContext context, TagHelperOutput output)
{
var c = output.Content.GetContent();
// c is empty; how to get content "bla bla"?
}
}
ITagHelper
in the assemblies added in your_ViewImports.cshtml
. In the first case I don't know if ASP.Net Core exposes such information – Purposeoutput.GetChildContentAsync()
– Purpose