editReferences
Edits the links for a file or path.
A canvas (.canvas) holder is covered too. Obsidian’s metadata cache holds an empty record for a canvas, so its file-node and text-node links are read from the canvas content being rewritten (as getCanvasReferences reads them), and the converter receives them as CanvasReferences. Options that only describe a note (external links, links in headings, reference-style definitions) do not apply to a canvas, and a canvas reference carries no position, so an offsetRange excludes every one of them.
Import:
import { editReferences } from '@mnaoumov/obsidian-lib/link';Signature:
function editReferences(params: EditReferencesParams): Promise<void>Parameters:
| Parameter | Type | Description |
|---|---|---|
params |
EditReferencesParams | The parameters for editing the links. |
Returns: Promise<void> — A Promise that resolves when the links have been edited.
Links to this page: