HelenM
HelenM

Reputation: 1

SharePoint 2010 rich text field showing html tags in list views

I have a custom list made up of out of the box SharePoint field types (no custom field types used), but I am using custom new/edit/display form on the list which I have created using application pages.

We want the users of the forms to be able to put rich text formatting on these fields, so I am using the following tags for this.... <SharePoint:InputFormTextBox ID="rteChangeDesc" RichText="true" RichTextMode="FullHtml" runat="server" TextMode="MultiLine" Rows="10" Width="99%" Columns="500"></SharePoint:InputFormTextBox>

This works great on the forms but the list views all show the html tags. I've tried various ways of removing these, including setting the disable-output-escaping="yes" in SharePoint designer, and this hasn't worked.

Currently, I am saving the fields to the list in the code-behind using Server.HtmlEncode(), then using the HTMLDecode to display the contents correctly.

Is there a way of easily removing HTML tags in the view column, without loosing the rich text functionality and tool bar in the forms?

Or can I do something in the code-behind code before saving these to the list that would make them display in view columns but keep the formatting in the form?

Any help appreciated! Thanks!

Upvotes: 0

Views: 8551

Answers (1)

Guest
Guest

Reputation: 1

Go to List Settings and modify the individual columns to show only rich text and not enhanced rich text. It worked for me. I can still include links and pictures and other HTML items but you do not see the code behind it.

Upvotes: 0

Related Questions