I am trying to render html tags with text in RichHtmlField control in SharePoint. Following is html code.
<%@ Register TagPrefix="Publishing" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<Publishing:EditModePanel ID="pnlDisplay" runat="server" PageDisplayMode="Display" SuppressTag="true">
<Publishing:RichHtmlField ID="RichHtmlField2" FieldName="eNetContactInformation" ControlMode="Display" runat="server" />
</Publishing:EditModePanel>
<Publishing:EditModePanel ID="pnlEditPanel" runat="server" PageDisplayMode="Edit" SuppressTag="false">
<Publishing:RichHtmlField ID="RichHtmlField1" FieldName="eNetContactInformation" ControlMode="Edit" runat="server" />
</Publishing:EditModePanel>
My site column (site collection level) schema definition is:
<Field
ID="{24056b49-f914-4935-a304-8cc2d1a01f0b}"
Name="eNetContactInformation"
DisplayName="Contact Information"
Type="HTML"
RichText="True"
RichTextMode="FullHTML"
Required="FALSE"
Group="eNet"
>
</Field>
I also tried following script to update site column of "pages" list for given sub site.
$site = get-spsite -limit All | where-object {$_.Url -eq "http://intra.******.enet"}
Write-Host "Vishal Processing Site Collection:" $site.Url
foreach($web in $site.AllWebs)
{
Write-Host "Web:" $web.Url
if($web.Url -like "http://intra.*****.enet/about/regions")
{
$list = $web.Lists["Pages"]
[Microsoft.SharePoint.Publishing.Fields.HtmlField]$field = [Microsoft.SharePoint.Publishing.Fields.HtmlField]$list.Fields.GetFieldByInternalName("eNetContactInformation")
$field.RichText = $true
$field.RichTextMode = [Microsoft.SharePoint.SPRichTextMode]::FullHtml
Write-Host "Field: " $field.Title
$field.Update()
Write-Host "List: " $list
$list.Update()
}
}
After too many efforts, still RichHtmlField control showing text as HTML markup.
Output:

Background:
We have big list of data ( with markup tags values) on production. Contact Information field have values containing HTML markup tags. In production it is working fine. It is properly rendering HTML. Great!
Now, the issue is in development and UAT environment. We had some strange thing going on which causes RichHTMLField control to display markup tags. RichHTMLField control referring Site Level Column. Publishing Feature is activated on site collection level and SharePoint Server Publishing feature is activated on web level. We do everything through VS2012 (No SP Designer). We can not afford to delete site column.
Do we missed any settings? or do we over-right any settings / binding with site columns?