Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am generating a RichHtmlField at run time. After post back the RichHtmlField does not show the Ribbon even if the content area has focus....has anyone encountered such behavior.
Posted

Write a quick powershell script to update the problem field, and the problem would go away . The change has to be made at the list level for it to take affect on existing pages/lists, but I believe making the modification to the column at the root web (or correct subweb) would work as well.
VB
$web = $site.OpenWeb($site.RootWeb.ID)
$list = $web.Lists["Pages"]
[Microsoft.SharePoint.Publishing.Fields.HtmlField]$field =   [Microsoft.SharePoint.Publishing.Fields.HtmlField]$list.Fields.GetFieldByInternalName("Abst     ract")
$field.RichText = $true
$field.RichTextMode = [Microsoft.SharePoint.SPRichTextMode]::FullHtml
$field.Update()
$list.Update()
 
Share this answer
 
I added SpRibbon.CommandUIVisible on page load to force it to display......Thx for the input @GanesanSenthilvel
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900