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();