December 19, 2008

Using SharePoint rich text editor (InputFormTextBox) in your application pages

As the SharePoint rich text editor is located in the Microsoft.SharePoint.WebControls namespace (Microsoft.SharePoint assembly), you have to add the following Register tag on your aspx page.

<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
After that, you simply have to add the InputFormTextBoxt control in your page.

<SharePoint:InputFormTextBox Rows="10" MaxLength="1000" id="txtMyRichTextBox" runat="server" RichText="true" RichTextMode="FullHtml" TextMode="MultiLine"  Height="400px" Width="250px"></SharePoint:InputFormTextBox>
The result is the following:

MSDN link:

No comments: