Move `Plugs: Reload` from the plug-manager plug into the editor plug alongside the other built-in client commands, ahead of removing plug-manager entirely.
40 lines
731 B
TypeScript
40 lines
731 B
TypeScript
import {
|
|
editor,
|
|
markdown,
|
|
system,
|
|
} from "@silverbulletmd/silverbullet/syscalls";
|
|
|
|
export async function parsePageCommand() {
|
|
console.log(
|
|
"AST",
|
|
JSON.stringify(
|
|
await markdown.parseMarkdown(await editor.getText()),
|
|
null,
|
|
2,
|
|
),
|
|
);
|
|
}
|
|
|
|
export async function wipeClientCommand() {
|
|
if (
|
|
!(await editor.confirm(
|
|
"Are you sure you want to wipe the client? This will clean the local cache.",
|
|
))
|
|
) {
|
|
return;
|
|
}
|
|
await system.wipeClient();
|
|
}
|
|
|
|
export async function wipeAndLogoutCommand() {
|
|
await system.wipeClient(true);
|
|
}
|
|
|
|
export async function reloadUICommand() {
|
|
await editor.reloadUI();
|
|
}
|
|
|
|
export async function reloadPlugsCommand() {
|
|
await system.reloadPlugs();
|
|
}
|