diff --git a/ts/editor/NoteEditor.svelte b/ts/editor/NoteEditor.svelte index 0b5abf23e..f84af9c29 100644 --- a/ts/editor/NoteEditor.svelte +++ b/ts/editor/NoteEditor.svelte @@ -147,6 +147,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html let noteId: number | null = null; export function setNoteId(ntid: number): void { + // TODO this is a hack, because it requires the NoteEditor to know implementation details of the PlainTextInput. + // It should be refactored once we work on our own Undo stack + for (const pi of plainTextInputs) { + pi.api.getEditor().clearHistory(); + } noteId = ntid; }