devexpress-richedit
Version:
DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.
14 lines (13 loc) • 658 B
JavaScript
import { IntervalBasedHistoryItem } from '../base/interval-based-history-item';
export class RemoveIntervalHistoryItem extends IntervalBasedHistoryItem {
constructor(modelManipulator, subDocInterval, setPropertiesSecondParagraph) {
super(modelManipulator, subDocInterval);
this.setPropertiesSecondParagraph = setPropertiesSecondParagraph;
}
redo() {
this.result = this.modelManipulator.range.removeIntervalInner(this.boundSubDocument, this.interval, this.setPropertiesSecondParagraph);
}
undo() {
this.modelManipulator.range.restoreRemovedInterval(this.boundSubDocument, this.result);
}
}