Javascript and Typescript highlighting

This commit is contained in:
Zef Hemel
2022-04-24 18:06:34 +02:00
parent a2cb2727d2
commit 6a10cbd9b7
21 changed files with 229 additions and 744 deletions
+5
View File
@@ -0,0 +1,5 @@
functions:
toggleDraftMode:
path: "./draft.ts:toggleMode"
command:
name: "Draft: Toggle Mode"
+7
View File
@@ -0,0 +1,7 @@
import * as clientStore from "@silverbulletmd/plugos-silverbullet-syscall/clientStore";
export async function toggleMode() {
let currentValue = !!(await clientStore.get("enableDraftMode"));
console.log("New draft mode", !currentValue);
await clientStore.set("enableDraftMode", !currentValue);
}