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

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

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

Do you want to enable rich text on your Multiline text fields? Converting from plain text to rich text or enhanced rich text in SharePoint is simple,

  1. Go to the list settings >> Click on the column name to enter the column settings.
  2. 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.
  3. 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 - SharePoint Expert with Two decades of SharePoint Experience. Love to Share my knowledge and experience with the SharePoint community, through real-time articles!

Leave a Reply

Your email address will not be published. Required fields are marked *