I’m trying to convert a block of space-lua to a self-contained plug on SilverBullet v2 that I’d like to share with the community.
The working principle is that you call a function in a Lua Expression block to render the interactive functionality of the plug (generated using the dom APIs), for example:
${ mystuff.renderMyTools() }
How do I achieve the same in a Plug? I’ve played with the .yaml file in the Plug template but I can’t seem to find a solution.
Any suggestions? Should I completely change my approach?
If I understand you correctly, you can also make it a syscall, there are plenty of examples in the core plugs. On my phone rn so I can‘t provide an example, but then you don‘t need the invokeFunction thing