How to Set Multiple Lines of Text Field Type to Rich Text or Enhanced Rich Text in SharePoint?
How to Set Multiple Lines of Text Field Type to Rich Text or Enhanced Rich Text in SharePoint?
Converting from plain text to rich text or enhanced rich text in SharePoint is simple,
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.
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 in to 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.
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 }
How to Set Multiple Lines of Text Field Type to Rich Text or Enhanced Rich Text in SharePoint?
Reviewed by Salaudeen Rajack
on
February 03, 2018
Rating:

No comments:
Please Login and comment to get your questions answered!