简体   繁体   English

RichHtmlField无法在共享点内部正确呈现

[英]RichHtmlField not rendering properly inside sharepoint

Hey i have a sharepoint page where i let the user use edit mode to edit the content of the page. 嘿,我有一个共享点页面,我可以让用户使用编辑模式来编辑页面的内容。

This is my Display panel where the content is shown 这是我的显示面板,显示内容

<wss:EditModePanel ID="pnlDisplay" runat="server" PageDisplayMode="Display" SuppressTag="true">
    <wss:RichHtmlField ID="txtTitre" runat="server" FieldName="TitreNouvelle"/>
    <wss:RichHtmlField ID="txtSousTitre" runat="server" FieldName="NouvelleSoustitre" />
    <wss:RichHtmlField ID="txtSommaire" runat="server" FieldName="NouvelleSommaire" />
    <wss:RichHtmlField ID="txtContenu" runat="server" FieldName="NouvelleContenu" />
    <asp:Image ID="imageNouvelle" runat="server" FieldName="NouvelleImgURL"/>
</wss:EditModePanel>

This is where the content is edited. 在这里编辑内容。

<wss:EditModePanel ID="pnlEditPanel" runat="server" PageDisplayMode="Edit" SuppressTag="false">
    <wss:RichHtmlField ID="editTxtTitre" runat="server" FieldName="TitreNouvelle"/>
    <wss:RichHtmlField ID="editTxtSousTitre" runat="server" FieldName="NouvelleSoustitre" />
    <wss:RichHtmlField ID="editTxtSommaire" runat="server" FieldName="NouvelleSommaire" />
    <wss:RichHtmlField ID="editTxtContenu" runat="server" FieldName="NouvelleContenu" />
    <asp:Image ID="EditImgNouvelle" runat="server" FieldName="NouvelleImgURL"/>
</wss:EditModePanel>

The problem i have is that when i go into edit mode inside the page, i can edit the content just fine but after saving, if i switch back to display mode it only shows the HTML tags. 我的问题是,当我进入页面内的编辑模式时,可以很好地编辑内容,但是保存后,如果我切换回显示模式,则仅显示HTML标签。 Title will show the strong html tag before the title, am getting the source of the HTML and not the result. 标题将在标题之前显示强html标记,这是在获取HTML的来源而不是结果。 Any help ? 有什么帮助吗?

Thanks ! 谢谢 !

The Content type where the problem, where they were registered as Text and not HTML which is why they showed HTML tags, i simply went to the list of pages and delete my content type and its columns, when i redeployed it updated the content type to have the correct field type. 问题所在的内容类型,将它们注册为文本而不是HTML,这就是为什么它们显示HTML标签的原因,我只是转到页面列表并删除了我的内容类型及其列,当我将其重新部署时,将内容类型更新为具有正确的字段类型。

You can make sure you have the right field type by coding a small snippet that outputs all the fields from your content type, from web.ContentTypes[index] 您可以通过编码一个小的片段来确保您拥有正确的字段类型,该片段可以从您的内容类型(从web.ContentTypes [index])输出所有字段

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM