add mod+z/y shortcuts, set editor state to what history manager returns

This commit is contained in:
Bruno Windels 2019-08-01 11:27:09 +02:00
parent 98bc0d24f4
commit 234404e598
2 changed files with 28 additions and 0 deletions

View file

@ -90,6 +90,11 @@ export default class EditorModel {
}
}
reset(serializedParts, caret, inputType) {
this._parts = serializedParts.map(p => this._partCreator.deserializePart(p));
this._updateCallback(caret, inputType);
}
update(newValue, inputType, caret) {
const diff = this._diff(newValue, inputType, caret);
const position = this.positionForOffset(diff.at, caret.atNodeEnd);