Using BBCode with C1EditorExtender
In This Topic
The C1EditorExtender control supports BBCode, or Bulletin Board Code, which is a markup language used to format posts in message boards. Simply set the Mode property to take advantage of this feature.
<cc1:C1EditorExtender ID="EditorExtender1" runat="server" TargetControlID="TextBox1" Mode="Bbcode" />
- Create an ASP.NET Web application.
- Add a standard TextBox control to the main content of your page.
-
Resize the TextBox to make it larger, set the TextMode property to MultiLine, and enter some content. For example, use the following XAML markup:
<asp:TextBox ID="TextBox1" runat="server" Height="264px" TextMode="MultiLine" Width="415px">This is some [B]sample text[/B]. You can visit [URL=http://componentone.com/]C-ONE[/URL].</asp:TextBox>
- Click the TextBox smart tag and select Add Extender from the Tasks menu.
- In the Extender Wizard, select C1EditorExtender and click OK. A C1EditorExtender control is added to the page and the TargetControlID is set to TextBox1.
- Select View | Properties Window in the Visual Studio menu.
- Click the drop-down list at the top of the Properties window and select TextBox1_C1EditorExtender.
- Set the C1EditorExtender.Mode property to Bbcode. Your markup should look similar to this:
<cc1:C1EditorExtender ID="EditorExtender1" runat="server" TargetControlID="TextBox1" Mode="Bbcode" />
-
Press F5 to run the application. The editor displays the BBCode formatted content.
![](DocumentGraphics/TBH/Bbcode_Editor.png)