- Online Barcode Generator
- How To
- Buy Now
Information to Drop-down Paragraph Styles
The paragraph style drop-down in the toolbars of html editor provide a collection of paragraph style items for users to select freely. With the drop-down of paragraph styles, users are enabled to perform different styles to the paragraphs located in the editor content area by an easy selection at one certain item from the drop-down list. The PerHtmlEditor Control, by default, contains a pre-defined set of paragraph styles. But developers are allowed to add custom items to the collection of paragraph styles.
And from this tutorial, you will find detailed programming examples for the creation and customization of paragraph style drop-down. If you have any question in building the drop-down of paragraph style, please feel free to contact us.
Here we attach an image to represent the general appearance of the paragraph style drop-down.
How to Enable Drop-down of Paragraph Styles
The activation of the paragraph style drop-down is extremely easy. What you need to do is to declare the drop-down of paragraph styles in aspx web page. You can use the default paragraph style collection that the PerHtmlEditor control has provided. Of course, you can create a custom drop-down collection of the paragraph styles. We will illustrate this in next section.
How to Add Custom Paragraph Style to Drop-down Collection
Besides the paragraph styles that the PerHtmlEditor control has offered, developers are also allowed to add some custom paragraph styles. Here we attach a sample code to guide you how to add custom paragraph styles to the drop-down collection of paragraph styles in aspx web page.
<kettic:PerHtmlEditor runat="server" ID="PerHtmlEditor1" SkinID="DefaultSetOfTools"
You can also add custom style to the paragraph style collection using C# code programmatically, as is instructed in following code sample.
PerHtmlEditor1.Paragraphs.Add("Heading 1", "<h1>");
Related Tutorials for Other Supported HtmlEditor Drop-downs
Apart from this paragraph style drop-down, the PerHtmlEditor Control for ASP.NET AJAX also allows users to create other commonly used drop-downs. Following links will take you to detailed programming guiding pages on how to add these drop-downs to html editor in ASP.NET web application.
ASP.NET AJAX UI Controls