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

12 lines
292 B
TypeScript
Raw Normal View History

2022-04-25 08:33:38 +00:00
import {
getCursor,
insertAtCursor,
moveCursor,
2022-04-25 09:24:13 +00:00
} from "@silverbulletmd/plugos-silverbullet-syscall/editor";
export async function insertQuery() {
let cursorPos = await getCursor();
await insertAtCursor(`<!-- #query -->\n\n<!-- /query -->`);
await moveCursor(cursorPos + 12);
}