From 978575498c68c5361a300304696fe279b9b30ea5 Mon Sep 17 00:00:00 2001 From: zadam Date: Mon, 23 Mar 2020 12:31:10 +0100 Subject: [PATCH] reference insertion is now immediate --- package.json | 2 +- src/public/javascripts/widgets/type_widgets/text.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 8d3a292d1..8deba9d61 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "serve-favicon": "2.5.0", "session-file-store": "1.4.0", "simple-node-logger": "18.12.24", - "sqlite": "3.0.3", + "sqlite": "3.0.6", "sqlite3": "4.1.1", "string-similarity": "4.0.1", "tar-stream": "2.1.2", diff --git a/src/public/javascripts/widgets/type_widgets/text.js b/src/public/javascripts/widgets/type_widgets/text.js index fc1bdbde4..7c2692a15 100644 --- a/src/public/javascripts/widgets/type_widgets/text.js +++ b/src/public/javascripts/widgets/type_widgets/text.js @@ -143,6 +143,10 @@ export default class TextTypeWidget extends TypeWidget { async doRefresh(note) { this.textEditor.isReadOnly = note.hasLabel('readOnly'); + // make sure internal link targets are in cache so that sync CKEditor referenceLink widget can pick them up + const internalLinkNoteIds = note.getOwnedRelations('internalLink').map(note => note.value); + await treeCache.getNotes(internalLinkNoteIds, true); + const noteComplement = await treeCache.getNoteComplement(note.noteId); await this.spacedUpdate.allowUpdateWithoutChange(() => {