Workspace.openLinkText method
Workspace › openLinkText
Official
Open a link text.Signature:
openLinkText(linktext: string, sourcePath: string, newLeaf?: boolean | PaneType, openViewState?: OpenViewState): Promise<void>Parameters:
| Parameter | Type | Description |
|---|---|---|
| linktext | string | The link text to open. |
| sourcePath | string | The source path to open. |
| newLeaf? | boolean | PaneType | The type of the leaf to open. |
| openViewState? | OpenViewState | The view state to open. |
Returns: Promise<void> — A promise that resolves when the link is opened.
Since: 0.16.0
Example:
app.workspace.openLinkText('foo', 'bar.md', 'tab');