none
Rich text column in document library RRS feed

  • Question

  • Hi,

    We have a column created in document library with type as "Multiple lines of text". At the moment this column holds simple text data so that in document library view, we are able see this simple text content. But now this column is expecting to have the content in html. Hence we need to change this column type to enable to view html content (with table, css styles,...). Hence in document library, when tried to edit this column, there is no option to update the type of this column as rich text. Could you please let me know if there is a way to update document library column type to rich text?

    Thanks & Regards,

    Suresh Channam

     

    Saturday, January 15, 2011 7:10 AM

Answers

  • Yes it has to be done programmatically after the site column is created and added to the content type for the document library.
    Paul Stork SharePoint Server MVP
    • Marked as answer by Suresh Channam Thursday, January 20, 2011 6:45 AM
    Monday, January 17, 2011 1:10 PM

All replies

  • The problem is that even if you add a multiple Lines of text column to a document library with RichText enabled, the document library will turn off the RichText capability of the field automatically.  So even if you add a RichText enabled field to a document library it will automatically turn off the RTF capability and leave it as a plain Multiple line of text field.  I ran into this at a client last summer and the only fix was to reset the RichText property of the SPFieldMultiLineText field to true after the library was created.  I don't know why MS turns rich text fields off in a document library by default, but the fix we put in place has worked without raising any issues.


    Paul Stork SharePoint Server MVP
    Saturday, January 15, 2011 2:54 PM
  • You can do that.

    Go to document library settings -->Advanced settings-->Then select the manage ment of content type yes.

    Then below the General settings you can find your content type heading and below the content type of the Document library.

    Click on it then u can see your multi line column there click on it then change the type to Rich text

     


    Destin -MCPD: SharePoint Developer 2010, MCTS:SharePoint 2007 Application Development
    Saturday, January 15, 2011 2:56 PM
  • Hi Paul,

    So, Is it something to be done programatically by accessing document library and updating the column in document library by resetting RichText property of the SPFieldMultiLineText field?

    Thanks & Regards,
    Suresh Channam

    Monday, January 17, 2011 8:31 AM
  • Hi Destin,

    I have tried this option earlier but rich text option is not available at columns in document library. When tried to create a site column then this option is available but when come to existed column updation in document library then this rich text option is not available. During this verification, came across below reference for this scenario mentioning the same that rich text option is not available in document library column.

    http://social.msdn.microsoft.com/Forums/en/sharepointcustomization/thread/67a70245-cd03-48e1-b0fa-71bbb6a7744d

    Thanks & Regards,
    Suresh Channam

    Monday, January 17, 2011 8:42 AM
  • Yes it has to be done programmatically after the site column is created and added to the content type for the document library.
    Paul Stork SharePoint Server MVP
    • Marked as answer by Suresh Channam Thursday, January 20, 2011 6:45 AM
    Monday, January 17, 2011 1:10 PM
  • Hi Paul,

    Thank you, I have tried to update document library column RichText property programtically and able to resolve the issue.

    Thanks & Regards,

    Suresh Channam

    Thursday, January 20, 2011 6:50 AM
  • I'm sorry, I have read as much as I can find on this topic but I still don't understand.  How exactly to I "reset the RichText property of the SPFieldMultiLineText field to true after the library was created?"
    Thursday, January 17, 2013 3:48 AM
  • I think the easiest way to achieve this is using SharePoint Manager.  First create a standard multi-line text field and set the 'Allow unlimited length in document libraries:' property to Yes.

    Then browse to the field in question using SPM.  With the multi-line text field in focus set the RichText property to True and the RichTextMode property to Compatible (for rich text light) of FullHtml (for the full ribbon experience) as required. Then simply save the changes using SPM.  Job done.

    A couple of caveats.  First SPM uses the full server OM and so can only be run from a SharePoint server.  Second, it seems that if you make any adjustments to the field through the standard SP UI then the field reverts to plain text mode.  That's why you should set the Unlimited length property first.

    Wednesday, August 21, 2013 5:30 AM