This commit is contained in:
Zef Hemel
2025-01-08 17:09:09 +01:00
parent 29e127ca78
commit c2fea2d25b
13 changed files with 258 additions and 32 deletions
+9 -1
View File
@@ -1,4 +1,4 @@
import type { UploadFile } from "../types.ts";
import type { PageMeta, UploadFile } from "../types.ts";
import { syscall } from "../syscall.ts";
import type { PageRef } from "../lib/page_ref.ts";
import type { FilterOption } from "@silverbulletmd/silverbullet/type/client";
@@ -17,6 +17,14 @@ export function getCurrentPage(): Promise<string> {
return syscall("editor.getCurrentPage");
}
/**
* Returns the meta data of the page currently open in the editor.
* @returns the current page meta data
*/
export function getCurrentPageMeta(): Promise<PageMeta | undefined> {
return syscall("editor.getCurrentPageMeta");
}
/**
* Returns the full text of the currently open page
*/