import { editor, markdown } from "$sb/silverbullet-syscall/mod.ts"; export async function parsePageCommand() { console.log( "AST", JSON.stringify( await markdown.parseMarkdown(await editor.getText()), null, 2, ), ); } export async function showLogsCommand() { await editor.showPanel( "bhs", 1, `
" + serverLogs.map((le) => "[" + le.level + "] " + le.message).join("\\n") + "";
}
const clientLogs = await syscall("sandbox.getLogs");
clientDiv.innerHTML = "" + clientLogs.map((le) => "[" + le.level + "] " + le.message).join("\\n") + "";
}).catch(console.error);
}, 1000);
});
`,
);
}
export async function hideBhsCommand() {
await editor.hidePanel("bhs");
}