LinkValue
Official
Value wrapping an internal wikilink.
Import:
import { LinkValue } from 'obsidian';Signature:
export class LinkValue extends StringValueExtends: StringValue
Constructor
new LinkValue(app: App, value: string, sourcePath: string, display?: string | null | undefined)Constructor.
To get the constructor instance, use getLinkValueConstructor from obsidian-typings/implementations.
Properties
| Property | Type | Description | |
|---|---|---|---|
| app | App | Reference to the app instance. | |
| display | null | StringValue | The display text of the link, or null if none. | |
| sourcePath | string | The source path the link is resolved relative to. | |
| type | string | (Inherited from StringValue) |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| parseFromString(app, input, sourcePath) | LinkValue | null | Create a new LinkValue from wikilink syntax. | |
| resolve() | null | TFile | Resolves the link to its target file. |
Links to this page: