devexpress-richedit
Version:
DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.
16 lines (15 loc) • 653 B
JavaScript
import { HistoryItem } from '../base/history-item';
export class ChangeFieldHyperlinkInfoHistoryItem extends HistoryItem {
constructor(modelManipulator, boundSubDocument, fieldIndex, newInfo) {
super(modelManipulator);
this.boundSubDocument = boundSubDocument;
this.newInfo = newInfo;
this.fieldIndex = fieldIndex;
}
redo() {
this.oldInfo = this.modelManipulator.field.setHyperlinkInfoInner(this.boundSubDocument, this.fieldIndex, this.newInfo);
}
undo() {
this.modelManipulator.field.setHyperlinkInfoInner(this.boundSubDocument, this.fieldIndex, this.oldInfo);
}
}