jodit
Version:
Jodit is awesome and usefully wysiwyg editor with filebrowser
26 lines (21 loc) • 614 B
text/typescript
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2020 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/
import { SnapshotType } from '../../types';
import { Observer } from './observer';
export class Command {
undo(): void {
this.observer.snapshot.restore(this.oldValue);
}
redo(): void {
this.observer.snapshot.restore(this.newValue);
}
constructor(
readonly oldValue: SnapshotType,
readonly newValue: SnapshotType,
readonly observer: Observer,
readonly tick: number
) {}
}