using RichTextBox control in Sharepoint MOSS 2007
Like me you too came searching for the RichTextField control for SharePoint. But you will be surprised that this is not the one you are looking for.
You must be looking for a control which will allow you to create formatted text as shown in below given image.
InputFormTextBox is the correct control you will ever need. This is available under Microsoft.SharePoint.WebControls namespace. (Only MOSS 2007)
How to use it? Very simple.
InputFormTextBox richMessage = new InputFormTextBox();
richMessage.RichText = true;
richMessage.RichTextMode = SPRichTextMode.FullHtml;
You may also use following useful properties:
richMessage.AllowHyperlink = true;
richMessage.TextMode = TextBoxMode.MultiLine;
richMessage.Wrap = true;
richMessage.Rows = 10;
richMessage.Width = System.Web.UI.WebControls.Unit.Percentage(100);
Check another thread for known issues with InputFormTextBox Control.
InputFormTextBox width, Enabled, ReadOnly Properties not working properly
If you found this post helpful then please share it.



i m trying to add richtextbox dynamically, but javascript is not supporting even , server side i am using with updatepanle , the controls are not rendering fully
January 8th, 2009 at 8:45 PM