Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

History Class

Contains methods related to Rich Text Editor history.

#Declaration

TypeScript
export class History

#Remarks

An object of the History class can be accessed by the history property.

richEdit.history.undo();

#Methods

#beginTransaction Method

Specifies that the following actions should be saved as a single history transaction.

#Declaration

TypeScript
beginTransaction(): void

#Remarks

Use the beginTransaction and endTransaction methods to process several actions as a single history transaction.

richEdit.beginUpdate();
richEdit.history.beginTransaction();
var subDocument = richEdit.selection.activeSubDocument;
var position = richEdit.selection.active;
var columnCount = 5;
var rowCount = 5;
var table = subDocument.tables.create(position, columnCount, rowCount);
for (var rowInd = 0, row; row = table.rows.getByIndex(rowInd); rowInd++) {
    for (var cellInd = 0, cell; cell = row.cells.getByIndex(cellInd); cellInd++) {
        subDocument.insertText(cell.interval.start, "Row[" + rowInd + "].Cell[" + cellInd + "]");
    }
}
richEdit.history.endTransaction();
richEdit.endUpdate();

#clear Method

Clears the editor history.

#Declaration

TypeScript
clear(): void

#endTransaction Method

Ends a history transaction.

#Declaration

TypeScript
endTransaction(): void

#Remarks

Use the beginTransaction and endTransaction methods to process several actions as a single history transaction.

#redo Method

Redoes the last undone action in the Rich Text Editor.

#Declaration

TypeScript
redo(): void

#Remarks

richEdit.history.redo();

#undo Method

Undoes the last action in the Rich Text Editor.

#Declaration

TypeScript
undo(): void

#Remarks

richEdit.history.undo();