RenderInternalLinkParams
Parameters for renderInternalLink.
Import:
import type { RenderInternalLinkParams } from '@mnaoumov/obsidian-lib/markdown';Signature:
export interface RenderInternalLinkParamsProperties
| Property | Type | Description |
|---|---|---|
| afterReveal? | () => Promise<void> | void | Called after a click has revealed the link's destination in the file explorer, once the explorer has finished taking the focus for it — so this is where a caller moves the focus somewhere else. Awaited, and called only for a click that reveals: always for a folder link, and for a file link only with RenderInternalLinkParams.shouldRevealFile and a destination that exists. With the file explorer disabled it is still called, right away, since there is then nothing to wait for. |
| app | App | The Obsidian app instance. |
| displayText? | string | The text to display for the internal link. |
| folderNote? | RenderInternalLinkFolderNoteOptions | How to answer which note is a folder's folder note, when the link names a FOLDER. Omitted means FolderNoteLocation.Auto: the installed folder-notes plugin's live configuration, or a note named after its folder, inside it, when that plugin is absent. Pass { location: FolderNoteLocation.None } for a folder link that must only ever reveal. |
| pathOrAbstractFile | PathOrAbstractFile | The path or abstract file to render the internal link for. |
| shouldRevealFile? | boolean | Whether clicking a FILE link also highlights that file in the file explorer, on top of the open Obsidian's own link handler performs. Opt-in, unlike the folder branch: a folder link has always revealed (revealing was all its click could mean), whereas a file link has always only opened — so turning this on by default would change what every existing caller's link does. |
Links to this page: