Obsidian Module
This module exposes all the functions and classes from the Obsidian API.
This is mostly useful when writing scripts.
Refer to the Obsidian API declaration file for more information.
Examples
// Get all folders
<%
tp.app.vault.getAllLoadedFiles()
.filter(x => x instanceof tp.obsidian.TFolder)
.map(x => x.name)
%>
// Normalize path
<% tp.obsidian.normalizePath("Path/to/file.md") %>
// Html to markdown
<% tp.obsidian.htmlToMarkdown("\<h1>Heading\</h1>\<p>Paragraph\</p>") %>
// HTTP request
<%*
const response = await tp.obsidian.requestUrl("https://jsonplaceholder.typicode.com/todos/1");
tR += response.json.title;
%>