Skip to main content

Formatting Paragraphs

To modify paragraph formatting, you can use either the Paragraph object or the ParagraphProperties interface. The interface is more convenient to use, since it can be easily accessed for a particular document range via the SubDocument.BeginUpdateParagraphs method. Do not forget to call the SubDocument.EndUpdateParagraphs method to properly finalize modification.

To change default paragraph formatting for the current document, use the Document.DefaultParagraphProperties property.

The ParagraphProperties.Style property enables you to apply a style to the current paragraph. For more information, see the Styles topic.

RichEdit Core implements a number of commands to help you with paragraph formatting. The following table lists commands used to format text and also lists default keyboard shortcuts.

NOTE

Keyboard shortcuts are operational, unless they are intercepted by a browser.

Key Combination Command
ChangeParagraphLineSpacingCommand
CTRL+1 SetSingleParagraphSpacingCommand
CTRL+2 SetDoubleParagraphSpacingCommand
CTRL+5 SetSesquialteralParagraphSpacingCommand
CTRL+E ToggleParagraphAlignmentCenterCommand
CTRL+J ToggleParagraphAlignmentJustifyCommand
CTRL+L ToggleParagraphAlignmentLeftCommand
CTRL+R ToggleParagraphAlignmentRightCommand
AddSpacingAfterParagraphCommand
AddSpacingBeforeParagraphCommand
RemoveSpacingAfterParagraphCommand
RemoveSpacingBeforeParagraphCommand
See Also