I am trying to create a custom command to open an existing page/create a new one, but cant figure out the Lua command for it. Found nothing among the space or editor APIs.
In v1 i solved this by editing the Quick Note template, that is no longer possible in v2. Basically if I get the Lua representation of Quick Note i should be good to go what i want to achieve.
Maybe these two pages are useful to you
thanks a lot. I have found the template for the quick note template, but i thought its just a description and not an actual template (which i assumed is hardcoded in the background).
so templates are not defined by lua scripts, but this frontmatter stuff?
Yes and no, you can look at the implementation in your own instance in the library. It’s mostly on the Page Templates page. The code queries all pages tagged with meta/template/page and looks at the frontmatter (Stuff like suggestedName and confirmName) and then creates commands for the page using the command api. So all the options are just coded in space lua, there isn’t anything inside SBs core about page templates. I think the code explains this best tho.