Open
Description
You can currently only define custom functions (https://silverbullet.md/Functions) in space script, not through plugs. This is a bit silly and should be made possible.
Likely design:
system.registerFunction({name: "myFunction"}, `() => 10`);
The second argument will need to be a string with JavaScript code (to be eval'ed) because custom functions must (for performance reasons) run in the main browser thread. So we need to ship the code from a plug over to the main thread in JavaScript text form, unfortunately.
Metadata
Metadata
Assignees
Type
Projects
Status
Backlog