You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That would allow Obsidian to automatically update the link whenever the file path changes (as seems to be requested by #292) and would simplify the overall work-flow for vanilla use cases.
From my poking around the source, it seems the change would only require changes to getAnnotationTarget function in annotatorView.tsx:
getAnnotationTarget(file: TFile): string{constannotationTargetPropertyValue=this.plugin.getPropertyValue(ANNOTATION_TARGET_PROPERTY,file);if(!annotationTargetPropertyValue){this.plugin.log('Invalid annotation target!');return'';}for(lettargetof[annotationTargetPropertyValue,`${this.plugin.settings.customDefaultPath}${annotationTargetPropertyValue}`]){//unpack target if it is is an array (For Metaedit compatability)if(Array.isArray(target)){target=target[0];}if(isUrl(target)){returntarget;}letdestFile: TFile;try{destFile=this.app.metadataCache.getFirstLinkpathDest(target,file?.path||'');}finally{if(destFile){returndestFile.path;}}}}
Unfortunately I am not a TypeScript developer, nor am I familiar with inner workings of Obsidian or Annotator to attempt an implementation myself.
The text was updated successfully, but these errors were encountered:
Would it be possible to allow for annotation-target link to be a wiki-link ?
For example:
That would allow Obsidian to automatically update the link whenever the file path changes (as seems to be requested by #292) and would simplify the overall work-flow for vanilla use cases.
From my poking around the source, it seems the change would only require changes to
getAnnotationTarget
function inannotatorView.tsx
:Unfortunately I am not a TypeScript developer, nor am I familiar with inner workings of Obsidian or Annotator to attempt an implementation myself.
The text was updated successfully, but these errors were encountered: