1
0
silverbullet/packages/plugs/query/command.ts
2022-04-25 10:33:38 +02:00

12 lines
282 B
TypeScript

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