getLinkpath
Official
Converts the linktext to a linkpath.
Import:
import { getLinkpath } from 'obsidian';Example:
console.log(getLinkpath('foo#bar')); // fooSignature:
function getLinkpath(linktext: string): stringParameters:
| Parameter | Type | Description |
|---|---|---|
linktext | string | A wikilink without the leading [[ and trailing ]]. |
Returns: string — the name of the file that is being linked to.
Example:
console.log(getLinkpath('foo#bar')); // foo