VS2012Logo

Visual Studio SharePoint List Rich HTML Field

I couldn’t figure out how to add Rich HTML field to a List I was deploying in a project. I searched MSDN, it’s literary reference for the Type property was “DataType”.

I threw my hands up. I remembered a trick I used somewhere else when I creating site templates though.

So I went to SharePoint. Created a quick list and Added the field I wanted. I Saved the field as a Template, went to the List Template Gallery and downloaded the template. I renamed the file extension from *.stp to *.cab and extracted the contents to a new folder. I opened the manifest.xml and searched for <field until I found the column I created. I copied the following values

Type="Note" NumLines="20" RichText="TRUE" RichTextMode="FullHtml"

So now that I found a working copy of the field. I went back into Visual Studio, went into the List Item that I added to the project. I went into the Schema.xml file and tweaked the field so its property array looked the same as the exported list templates.

About the author

Leave a Reply