1
0
silverbullet/plug-api/silverbullet-syscall/code_widget.ts
2023-11-15 10:08:21 +01:00

16 lines
400 B
TypeScript

import type { CodeWidgetContent } from "$sb/types.ts";
import { syscall } from "./syscall.ts";
export function render(
lang: string,
body: string,
pageName: string,
): Promise<CodeWidgetContent> {
return syscall("codeWidget.render", lang, body, pageName);
}
// Refresh all code widgets on the page that support it
export function refreshAll() {
return syscall("codeWidget.refreshAll");
}