ASP.Net does not provide a rich text box control in its set of web controls. So, if you need to place a rich text box on your SharePoint page you’ll have to use a commercial, free or open source text box control (and there are plenty out there). However if you don’t want to introduce another dependency, in the form of an external control, you can use SharePoint’s built-in rich text box.
If you’re creating a page layout that binds to a content types field then its straight forward and you can useRichTextField class. However, if you want to display a textbox that does not interact with a content type then you can use the InputFormTextBox and configure its properties so it render as a rich text box.
Here is an example:
<SharePoint:InputFormTextBox runat=”server” ID=”RichTextBox” ValidationGroup=”CreateCase” Rows=”8″ Columns=”40″ RichText=”true” RichTextMode=”Compatible” AllowHyperlink=”true” TextMode=”MultiLine” />
Note: change the RichTextMode value to ‘FullHtml’ to render more html icons in text box’s tool bar.
Please follow and like us:
Technical Solutions Professional | Modern Workplace Architect Lead | Microsoft 365 | SharePoint | Power Platform | MS Teams | React
Leave a Reply