Creating Dynamic, Editable Pages

I want to create a page similar to Tag Page or like a virtual page that is editable, but not saved to a markdown file, in TypeScript. I replicated the Virtual Pages pageCreating event listener to display custom content, but there are two problems:

  1. If I set rw, it creates a page whenever I actually try to edit the text (also, I have a colon in the filename so I'm not sure how that would be persisted to disk - but it is at least persisting to IndexedDB). Can I disable saving to a file? I want to manually control how data is saved.
  2. Unlike a tag:tagname page, the console shows a consistent network get request for the page.md that returns 404 (until problem (1) occurs) - can this be disabled?

I'm not sure if this is 100% the same thing, but I was looking into that repeated 404 issue for virtual pages the other day (Resolve virtual pages natively (instead of via editor:pageCreating) by Schmavery · Pull Request #1980 · silverbulletmd/silverbullet · GitHub)

Sounds like a cool concept, curious to know what it's for

That's a great PR, thanks for letting me know. It would probably solve issue (2).

This particular use case is an exercise in me creating some outliner-like app functionality similar to Logseq DB or https://morebrain.space/. After much research, I'm coming to the conclusion that deep outlining capability may be fundamentally incompatible with file-based PKM (even though I usually greatly prefer file-based systems). So while it may not ultimately make sense with SB, I want to try to build something just with IndexedDB key-value pairs, and deal with server storage issues later.

So in this case I don't yet want a file to be saved, but I don't want to create a separate pane - I want to use the main editor and dynamically update the contain therein, both programmatically and via the user. Hence problem (1).

There are probably less arcane use cases out there too!

One option I’ve considered is building a custom Document Editor intended for other filetypes (e.g., image viewer), but I don’t see how to still use the main editor’s features or UI that way, so it seems like a no go.