The position of the cursor when the page is opened

You can get a link with a title in a simpler way:

  1. Paste the https://xxxxx.com adress into SilverBullet from bookmark
  2. With your cursor touching this address (including at the end after pasting), run the Link: Unfurl command
    a. Search for “link” in the Command Palette
    b. Or directly with Ctrl+Shift+U
  3. Confirm the “Extract title” option

ezgif-4-70ac9b7683

Needlessly complex solution to actually move the cursor

I don’t know of a built-in way to do it, but I made this Space Script which I believe does what you just described:

```space-script
silverbullet.registerEventListener({name: "editor:pageLoaded"}, async (event) => {
  // this part allows you to only move cursor on some pages
  const title = await syscall("editor.getCurrentPage");
  if (!title.startsWith("Diary")) {
    return;
  }

  // this part actually moves the cursor
  const text = await syscall("editor.getText");
  await syscall("editor.moveCursor", text.length);

  // this part is here just to force the view to show where cursor is
  await syscall("editor.insertAtCursor", "someTextToMoveView"); // bit of a nasty trick
  await syscall("editor.undo"); // remove the text inserted in previous line
});
```
1 Like