开发者

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" run开发者_开发问答at="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!! ;)


Try this snippet

<Field ID="0000000-0000-0000-0000-000000000000" 
       DisplayName="Sample Rich Text Field"
       Name="SampleRichTextField"
       StaticName="SampleRichTextField"
       Group="Sample Fields"
       Type="Note"
       RichText="TRUE"
       RichTextMode="FullHtml"
       Sealed="FALSE" 
       SourceID="http://schemas.microsoft.com/sharepoint/v3" />


Try using Telerik's free RadMossHTMLEditor. The OOTB publishing HTML field does not have cross-browser support. The free control from Telerik works great for me. The controls is called RadEdtior Moss Lite.

Get it from here - http://www.telerik.com/account/downloads/product-versions/single-version.aspx?pmvid=0&pid=543

Dont forget to get the documentation too.


<Field ID="{987B9BA2-23AB-4E52-99DD-2D59BAA79F4B}"
       Name="LeftContent" 
       DisplayName="Left Content" 
       RichText="TRUE" 
       **RichTextMode="ThemeHtml"** 
       Type="HTML" 
       Hidden="FALSE">
</Field>

Thats the solution!!!! ;)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜