diff --git a/Ooui.AspNetCore/TagHelpers/OouiTagHelper.cs b/Ooui.AspNetCore/TagHelpers/OouiTagHelper.cs new file mode 100644 index 0000000..09da17a --- /dev/null +++ b/Ooui.AspNetCore/TagHelpers/OouiTagHelper.cs @@ -0,0 +1,16 @@ +using Microsoft.AspNetCore.Razor.TagHelpers; + +namespace Ooui.AspNetCore.TagHelpers +{ + public class OouiTagHelper : TagHelper + { + public Ooui.Element Element { get; set; } + + public override void Process (TagHelperContext context, TagHelperOutput output) + { + output.TagName = "div"; + output.TagMode = TagMode.StartTagAndEndTag; + output.Content.SetHtmlContent (Element.OuterHtml); + } + } +} diff --git a/PlatformSamples/AspNetCoreMvc/Views/Shared/_Layout.cshtml b/PlatformSamples/AspNetCoreMvc/Views/Shared/_Layout.cshtml index efe8f47..17113f6 100644 --- a/PlatformSamples/AspNetCoreMvc/Views/Shared/_Layout.cshtml +++ b/PlatformSamples/AspNetCoreMvc/Views/Shared/_Layout.cshtml @@ -41,6 +41,9 @@