Tag Archives: rich text box

Rich Text Box in Share Point 2010

As you guys know that in SharePoint 2010, we have pretty kool ribbon interface… and that the Rich Text Box used in sharepoint uses the functionality within ribbon… So how to add a Rich Text Box in Visual Web Parts or anywhere in Share Point 2010?

Well, the solution is quite simple… We can have a very known Share Point 2007 InputFormTextBox to use in Share Point 2010… Those who are new to SharePoint must know that this was an available control in SharePoint 2007…

   1: <SharePoint:InputFormTextBox ID="txtFeed" runat="server" RichText="true" 

   2: TextMode="MultiLine" RichTextMode="FullHtml" Columns="500" 

   3: Rows="10" />

But as I used this control in my Visual Web Part, I was not able to change the width of the control… neither by its Columns property nor by its Width property… So a work around to this is to have some CSS that is internally used by the control… i.e.

   1: table.ms-rtetoolbarmenu

   2: { width:100%; }


   4: iframe.ms-rtelong

   5: { width:100%; } 

This will do the job… hope it might help some one Winking smile