Sitecore page editor render as HTML

1.3k views Asked by At

I have a Sitecore item ("Content Item"), which has a rich text as "<h2>Header text</h2>".

I want this to be rendered as html.

But using a field renderer when I try

FieldRenderer1.Item = DatabaseManager.MasterDatabase.GetItem(//content item);
FieldRenderer1.FieldName = "Content";"

Text is rendered as "<h2>Header text</h2>" in the mark up. How do I get them render as HTML?

1

There are 1 answers

0
Shriroop On

After reading the comments, I think may be trying this might work.

<sc:FieldRenderer id="HeaderText" runat="server" FieldName="HeaderText" />

This fixed my issues when I was trying something similar at my end.

FieldName specification is a must when it comes to FieldRenderers.