All docs
V21.2
21.2
21.1
20.2
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.

Paragraph

Insert a paragraph at the cursor position

var subDocument = richEdit.selection.activeSubDocument;
var position = richEdit.selection.active;
var paragraph = subDocument.insertParagraph(position);

Apply properties to a paragraph

var subDocument = richEdit.selection.activeSubDocument;
var position = richEdit.selection.active;

richEdit.history.beginTransaction();
richEdit.beginUpdate();  
var textInterval = subDocument.insertText(position, "Centered text");
subDocument.paragraphs.find(textInterval).forEach(function (paragraph) {
    paragraph.properties = { 
        alignment: DevExpress.RichEdit.ParagraphAlignment.Center,
    }; 
});
richEdit.endUpdate();  
richEdit.history.endTransaction();