Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
  [Expand]Reporting
  [Expand]Chart Control
  [Expand]Grid View
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Spreadsheet
  [Collapse]Rich Text Editor
   [Expand]Product Information
   [Collapse]Concepts
     ASPxRichEdit Control
    [Collapse]Document
     [Collapse]Document Model
       Sub-Document
       Text Content (Text Buffer)
       Characters
       Paragraphs
       Inline Pictures
       Hyperlinks and Bookmarks
       Tables
       Sections
       Headers and Footers
       Document Fields
       Floating Objects
       Document Protection
      Document Layout
     Supported Document Formats
     Import and Export
     Formatting Characters
     Formatting Paragraphs
    [Expand]Fields
     Mail Merge
     Restrictions
     Spell Checking
    [Expand]Client API
    [Expand]Built-in Dialogs
     HTML Tag Interpretation
     Keyboard Shortcuts
   [Expand]Examples
  [Expand]Image and Data Browsing
  [Expand]Docking and Popups
  [Expand]Site Navigation and Layout
  [Expand]File Management
  [Expand]Multi-Use Site Controls
  [Expand]Scheduler
  [Expand]HTML Editor
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gauges
  [Expand]Data Editors
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Paragraphs

Expanded Overview

Paragraphs are the most basic units of block-level content within a document. A paragraph defines a distinct division of content that begins on a new line. As text content, paragraphs are stored within a sub-document's text buffer. The end of paragraphs is marked with a specific paragraph end symbol (¶).

Expanded Definition

A paragraph is a logical unit that contains paragraph-specific settings and that defines to which text buffer interval these settings should be applied. Programmatically, a paragraph is implemented as the Paragraph client object. A list of paragraph objects in the active sub-document can be accessed through the paragraphsInfo client property (SubDocument.paragraphsInfo) in the following notation.
clientRichEditName.document.activeSubDocument.paragraphsInfo

A paragraph can be fully defined using the following characteristics (some of them are optional).

Expanded Paragraph Properties

Paragraphs expose their own paragraph-specific formatting settings. Some examples of paragraph properties are alignment, spacing and indentation. Information about paragraph formatting is exposed by client API - through the properties of the ParagraphFormattingSettings client object. This object is used in the changeParagraphFormatting client command (RichEditCommands.changeParagraphFormatting): in its execute method's parameter and in the getState method's return value.

Expanded Client API

The following client commands are available for applying paragraph formatting directly to the text. Call the commands in the notation given below:
clientRichEditName.commands.commandName.execute(parameter_if_any)

Command Name Link Description
addSpacingAfterParagraph RichEditCommands.addSpacingAfterParagraph Gets a command to add spacing after a paragraph.
addSpacingBeforeParagraph RichEditCommands.addSpacingBeforeParagraph Gets a command to add spacing before a paragraph.
changeParagraphBackColor RichEditCommands.changeParagraphBackColor Gets a command to change the background color of paragraphs in a selected range.
changeParagraphFormatting RichEditCommands.changeParagraphFormatting Gets a command to apply formatting settings to paragraphs within a selected range.
changeTabs RichEditCommands.changeTabs Gets a command to change the default tab stop value of a document and apply custom tab settings to the selected paragraphs.
decreaseIndent RichEditCommands.decreaseIndent Gets a command to decrease the indent level of paragraphs in a selected range.
decrementParagraphLeftIndent RichEditCommands.decrementParagraphLeftIndent Gets a command to decrement the paragraph's left indent position.
increaseIndent RichEditCommands.increaseIndent Gets a command to increment the indent level of paragraphs in a selected range.
incrementParagraphLeftIndent RichEditCommands.incrementParagraphLeftIndent Gets a command to increment the left indent of paragraphs in a selected range.
openParagraphFormattingDialog RichEditCommands.openParagraphFormattingDialog Gets a command to invoke the Indents And Spacing tab of the Paragraph dialog window.
openTabsDialog RichEditCommands.openTabsDialog Gets a command to invoke the Tabs dialog window.
removeSpacingAfterParagraph RichEditCommands.removeSpacingAfterParagraph Gets a command to remove spacing after the selected paragraph.
removeSpacingBeforeParagraph RichEditCommands.removeSpacingBeforeParagraph Gets a command to remove spacing before the selected paragraph.
setDoubleParagraphSpacing RichEditCommands.setDoubleParagraphSpacing Gets a command to format a selected paragraph with double line spacing.
setSesquialteralParagraphSpacing RichEditCommands.setSesquialteralParagraphSpacing Gets a command to format a current paragraph with one and a half line spacing.
setSingleParagraphSpacing RichEditCommands.setSingleParagraphSpacing Gets a command to format a current paragraph with single line spacing.
toggleParagraphAlignmentCenter RichEditCommands.toggleParagraphAlignmentCenter Gets a command to toggle centered paragraph alignment on and off.
toggleParagraphAlignmentJustify RichEditCommands.toggleParagraphAlignmentJustify Gets a command to toggle justified paragraph alignment on and off.
toggleParagraphAlignmentLeft RichEditCommands.toggleParagraphAlignmentLeft Gets a command to toggle left paragraph alignment on and off.
toggleParagraphAlignmentRight RichEditCommands.toggleParagraphAlignmentRight Gets a command to toggle right paragraph alignment on and off.

Expanded Paragraph Styles

To uniformly format multiple paragraphs, a paragraph style can be used. A paragraph style is a detached container of specific character and paragraph formatting settings. It allows you to apply a similar format to all required characters and paragraphs at once.

Note

If a certain text formatting property (for example, bold or indent) is set directly within the text as a character or paragraph property, style formatting is not applied to this setting (the style property setting does not override the explicitly defined character or paragraph property setting). To reset character or paragraph formatting, use the RichEditCommands.clearFormatting client command.

Expanded Client API

A list of paragraph styles can be accessed using the following paragraphStylesInfo property in the notation given below.
clientRichEditName.document.paragraphStylesInfo

Property Name Link Description
paragraphStylesInfo RichEditDocument.paragraphStylesInfo Provides information about paragraph styles in the current document.

To apply a paragraph style to the text, use the following changeStyle client command in the notation given below.
clientRichEditName.commands.changeStyle(parameter_if_any)

Command Name Link Description
changeStyle RichEditCommands.changeStyle Gets a command to apply a character or paragraph style settings to text in a selected range.

Paragraph formatting can be modified using a number of ribbon commands and a specific dialog. See the Formatting Paragraphs topic for more information.

How would you rate this topic?​​​​​​​