RadEditor for ASP.NET

RadEditor Send comments on this topic.
Paragraphs Property
See Also  Example
Telerik.WebControls Namespace > RadEditor Class : Paragraphs Property


Gets the collection containing the paragraph styles to put in the Paragraph Style dropdown.   

 

Namespace: Telerik.WebControls
Assembly: RadEditor (in RadEditor.dll)

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property Paragraphs As KeyValueCollection
Visual Basic (Usage)Copy Code
Dim instance As RadEditor
Dim value As KeyValueCollection
 
value = instance.Paragraphs
C# 
public KeyValueCollection Paragraphs {get;}

Return Value

A KeyValueCollection containing the paragraph styles to put in the Paragraph Style dropdown. Default is an empty KeyValueCollection.

Example

This example demonstrates how to put several paragraph styles in the Paragraph Style dropdown.
Visual BasicCopy Code
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    'Add clear formatting
    RadEditor1.Paragraphs.Add("Clear Formatting", "body")
    'Add the standard paragraph styles
    RadEditor1.Paragraphs.Add("Heading 1", "<h1>")
    RadEditor1.Paragraphs.Add("Heading 2", "<h2>")
    RadEditor1.Paragraphs.Add("Heading 3", "<h3>")
    'Add paragraph style With block Format And css Class
    RadEditor1.Paragraphs.Add("Heading 2 Bordered", "<h2 class=\"bordered\">")
End Sub
C#Copy Code
private void Page_Load(object sender, EventArgs e)
{
   
//Add clear formatting
   
RadEditor1.Paragraphs.Add("Clear Formatting", "body");
   
//Add the standard paragraph styles
   
RadEditor1.Paragraphs.Add("Heading 1", "<h1>");
   RadEditor1.Paragraphs.Add(
"Heading 2", "<h2>");
   RadEditor1.Paragraphs.Add(
"Heading 3", "<h3>");
   
//Add paragraph style with block format and css class
   
RadEditor1.Paragraphs.Add("Heading 2 Bordered", "<h2 class=\"bordered\">");
}
    

Remarks

The contents of this collection will override the default paragraph styles available in the Paragraph Style dropdown.

Note: RadEditor supports also block format with css class set. See the example below.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also