1
0
silverbullet/packages/plugs/query/command.ts
2022-06-08 15:58:43 +02:00

12 lines
292 B
TypeScript

import {
getCursor,
insertAtCursor,
moveCursor,
} from "@silverbulletmd/plugos-silverbullet-syscall/editor";
export async function insertQuery() {
let cursorPos = await getCursor();
await insertAtCursor(`<!-- #query -->\n\n<!-- /query -->`);
await moveCursor(cursorPos + 12);
}