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%; }
3:
4: iframe.ms-rtelong
5: { width:100%; }
This will do the job… hope it might help some one
Tagged: <SharePoint:InputFormTextBox, InputFormTextBox width, rich text box, rich text box sharepoint 2010, sharepoint 2010
I do not have any idea of share point server.
Can you explain me in few words what is share point ?
yar i would actually be writing a blog on that… don’t worry
because its quite difficult to explain SharePoint in few words 🙂
It has a past related to it, and now its evolving as a platform to built applications… and its being a very powerful platform though :)… will dive into more details… Also for quick look…
Look into how microsoft explains SharePoint 🙂
I would suggest you to use:
.ms-long{
width:100%;
}
instead of .ms-rtetoolbarmenu
I used .ms-rtetoolbarmenu, so I’ve got expanded the table the first collumn of the table. That caused other collumns to appear on the right side of the table.
Hi, this solution not work in SharePoint 2010, the tool pane not show, thanks
Working in Internet Explorer, not Chrome, sorry, thanks
yeah normally many items of SharePoint 2010 will not work with chrome 🙂 – So better test everything on IE!
Is there any alternate way to use rich text box in other browsers as the tool pane only work with IE ? there is a client requirement to show tool pane with other browsers also.
Faz, I seriously doubt if SharePoint is good with other browsers! OOB SharePoint works good, but custom development doesn’t support other browsers… I will let you know if I find something!
somehow put the image link without the html?
Vina, you want to put image without HTML? I don’t think it will be possible, coz this control actually generates HTML at the back-end..