1
0
silverbullet/packages/plugs/query/command.ts

8 lines
283 B
TypeScript
Raw Normal View History

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