Monday, April 30, 2012

Deploying Content Type with Publishing HTML Field by Feature saving content not correctly

I have a problem using a Publishing HTML Field.



The Elements.xml:



<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Field ID="{987B9BA2-23AB-4E52-99DD-2D59BAA79F4B}" Name="LeftContent" DisplayName="Left Content" RichText="TRUE" RichTextMode="FullHtml" Type="HTML" Hidden="FALSE"></Field>

<!-- Parent ContentType: Article Page (0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900242457EFB8B24247815D688C526CD44D) -->
<ContentType ID="0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900242457EFB8B24247815D688C526CD44D002da882f450a44abaacff86118ffffaeb"
Name="Left Content"
Version="0">
<FieldRefs>
<FieldRef ID="{987B9BA2-23AB-4E52-99DD-2D59BAA79F4B}"/>
</FieldRefs>
</ContentType>

</Elements>


In my Page Layout I use ...



<PublishingWebControls:RichHtmlField id="rchHtmlFldROSTableTwoColumnRight" FieldName="ROSTableTwoColumnRight" runat="server"/>


The problem is that when I create a page based on the page layout with this content type and edit the field, SharePoint saves the content not as HTML but HTML Entities. So in not-edit-mode you see the HTML source code like

Hello World



I hope somebody can help me.
Thanks!! ;)





No comments:

Post a Comment