Thursday, July 22, 2010

Add Multiline Rich Text/Enhanced Rich Text column to document library or picture library

As you might have noticed the by default multiline column type doesn’t support Rich Text or Enhanced Rich text capability for a document/picture library.


There are multiple way to get this feature enabled. First is changing the SQL table for that column which is quick but not recommended and second one is a few step solution which works great without breaking any Microsoft rules.

Lets get started with the steps.

Step 1 – Create a new Site Column

To create a new multiline rich text column, click on Site Actions > Site Settings > Site Columns, then click on Create to add new site column:

image image

Under “Additional Custom Settings”, you can select Rich text or Enhanced rich text option.

Step 2 – Create custom content type

Now we got the rich text site column, next step is to create a custom content type and add this column to it. To do that, click on Site Actions > Site Settings > Site Content Types, then click on Create link to add new content type:


You can give it any name and select the parent content type, for example “Document Content Type” and “Document”.

Click OK to save it.

Step 3 – Add custom site column to content type

Add the custom site column we created “RichtextColumn” to this content type:


Step 4 – Create document library with custom content type

Create a new dummy document library and go to Library Settings > Advanced Settings. Under first section “Content Types”, select “Yes” for “Allow management of content types?”.

Add custom content type we created to this library:


After this step you’ll see two content types for this document library. You can delete the default content type “Document” and just keep the custom one.:


after deletion:


Step 5 – Save custom document library as template

Next step is to save this custom document library as template so we can create the actual document libraries with rich text column. Under Library Settings, click on “Save document library as template”


Step 6 – Create document library from new template

Now we have created a new document library template, option will appear under “Site Actions > More Options” to create a new library based off that template:


step 7 – Add document to the library

Once the new document library is create based off new template, try adding a new document to this library and notice the rich text box column:


You can use similar steps to add custom rich text columns to picture library.

Hope this helps.


Anonymous said...

This is REALLY helpful! Thanks for the tip!

Steelcuda said...

Great post. One follow up question. Can you add the new Site Column to existing Document Libraries? I haven't figured out how to do that.

Anonymous said...

Really Awesome solution... samir

Anonymous said...

GOOD one

Jeremy Beeson said...
This comment has been removed by the author.
Anonymous said...

I know this is an older post but came across it as I just got this requirement from a client. I followed the steps and all worked well but in the library created from the template, I am unable to change the name of that column to something other than RichTextColumn. If it is edited, it goes back to plain text.

Has anyone else experienced this or found a way around it? Other than setting up a new template every time I need a column with rich text formatting and using the final name for the column in the beginning of the process?