1
0
silverbullet/plugs/query/command.ts

8 lines
267 B
TypeScript

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