Skip to content

getLinkAtEditorPosition

Finds the link at an editor position, the cursor by default. See getLinkAtPosition for the rules.

Import:

import { getLinkAtEditorPosition } from '@mnaoumov/obsidian-lib/link-at-position';

Signature:

function getLinkAtEditorPosition(params: GetLinkAtEditorPositionParams): LinkAtPosition | null

Parameters:

Parameter Type Description
params GetLinkAtEditorPositionParams The editor and the position.

Returns: LinkAtPosition | null — The link, or null when the position is not on one.


Links to this page: