Random prompt extension

Does anyone know of a way to create an extension that would grab a random block from a predetermined file and append it to your current doc. I would like to use this to import writing prompts.

any help or ideas would be appreciated :slight_smile:

Currently you can’t query other pages. eXtensions only work on the current document.

But maybe the snippets eXtension example from the Craft Team will do exactly what you want?

Hi FLohGro thanks for the response. I am using the snippets but I would love to have the randomness that I had in Roam or Obsidian…Maybe this will come as they widen the API…

I think you could modify the example to just insert a random snippet you stored;)?