SharePoint Rich Text Editor List Field strips out Target Attribute

In a custom SharePoint list definition that contains a field type which is a RTE (Rich Text Editor), I found that items added to the list would allow for anchor tags, but the “Target” attribute was stripped off when the HTML markup was saved. In the MSDN definition for the Field Element (List) I found an answer to this problem

The first step is to add the IsolateStyles property and set to false. The second step is to set the RichTextMode to “FullHtml.” After these to settings and updating the list, I was able to add the “target” attribute to an Anchor tag in the HTML markup for a list item.

In the end, this is what the field definition looks like in the list schema.xml file:

<Field ID=”{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}” Type=”HTML” DisplayName=”Description” NumLines=”4″ RichText=”TRUE” RichTextMode=”FullHtml” IsolateStyles=”FALSE” Name=”AlertDescription” RestrictedMode=”FALSE”/>

  1. Leave a comment

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: