improved reference link handling

This commit is contained in:
zadam 2020-03-26 20:40:15 +01:00
parent 5a6ab68144
commit 34de8fb874
4 changed files with 5 additions and 171 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -9,7 +9,7 @@ import treeCache from "../../services/tree_cache.js";
import linkService from "../../services/link.js";
import noteContentRenderer from "../../services/note_content_renderer.js";
const ENABLE_INSPECTOR = true;
const ENABLE_INSPECTOR = false;
const mentionSetup = {
feeds: [
@ -143,10 +143,6 @@ 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(() => {