How to Set Multiple Lines of Text Field Type to Rich Text or Enhanced Rich Text in SharePoint?

Requirement: Change Multiline text field to Rich Text or Enhanced Rich Text in SharePoint

How to Change Multiline text field to Rich Text or Enhanced Rich Text Field in SharePoint?

Converting from plain text to rich text or enhanced rich text in SharePoint is simple,

  • Go to the list settings >> Click on the column name to get into the column settings.
  • Select the column type to “Rich Text (Bold, italics, text alignment, hyperlinks)” or “Enhanced rich text (Rich text with pictures, tables, and hyperlinks)” as per your requirement.
  • Click on “OK” to save your changes.
    sharepoint set multiple lines of text field type to rich text or enhanced rich text

PowerShell to Set Multiple Lines of Text Field Type to Rich Text:

Here is the PowerShell to change multi-line text field type from Plain text to Rich text or Enhanced rich text.

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Set Parameters
$SiteURL = "https://intranet.crescent.com/sites/projects"
$ListName = "Projects"
$FieldInternalName="ProjectDescription"

#Get the web, List and Field objects
$web = Get-SPWeb $SiteURL
$List = $Web.Lists.TryGetList($ListName)
$Field = $List.Fields.TryGetFieldByStaticName($FieldInternalName)

#Check if the content type exists
If($Field -ne $NULL)
{
    #Set the Field Type "Rich Text"
    $Field.RichText = $True

    #Set Field Type to "Enhanced Rich Text"
    $Field.RichTextMode = "FullHtml"
    $Field.Update()
    Write-Host "Field Type Updated for '$($Field.Title)' Successfully!" -ForegroundColor Green
}
else
{
    Write-Host "Field '$FieldInternalName' doesn't Exist!" -ForegroundColor Red
}

Salaudeen Rajack

Salaudeen Rajack is a SharePoint Architect with Two decades of SharePoint Experience. He loves sharing his knowledge and experiences with the SharePoint community, through his real-world articles!

Leave a Reply