Search code examples
razorc1-cms

Parsing content of VisualXhtmlEditor with Razor


I read this page

http://docs.composite.net/XSLT/XSLTFAQ?q=How+to+parse+an+XHTML+value+from+a+data+field+used+in+XSLT+functions%3f

but I can not make it to work with the Razor syntax.

I understand I should first call the MarkupParser function like this

@Html.C1().Function("Composite.Xslt.Extensions.MarkupParser")

But then what...


Solution

  • Don't use the "MarkupParser" XSLT Extension when in Razor - use this:

    @Html.Raw(htmlString)